Skip to content

Commit

Permalink
#22: show warnings for only X11
Browse files Browse the repository at this point in the history
  • Loading branch information
antroids committed Mar 22, 2024
1 parent f065e61 commit e666de0
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 19 deletions.
18 changes: 5 additions & 13 deletions package/contents/ui/config/ConfigAppearance.qml
Original file line number Diff line number Diff line change
Expand Up @@ -57,20 +57,12 @@ KCM.SimpleKCM {
Kirigami.FormData.label: i18n("Window Control Buttons")
}

RowLayout {
Kirigami.FormData.label: i18n("Icons theme:")

ComboBox {
id: widgetButtonsIconsTheme

Layout.minimumWidth: Kirigami.Units.gridUnit * 15
model: [i18n("Plasma"), i18n("Breeze"), i18n("Aurorae")]
}

KCM.ContextualHelpButton {
toolTipText: i18n("<b>Plasma</b>: default icons from system <br/><b>Breeze</b>: implicit Breeze icons <br/><b>Aurorae</b>: installed theme can be used")
}
ComboBox {
id: widgetButtonsIconsTheme

Kirigami.FormData.label: i18n("Icons theme:")
Layout.minimumWidth: Kirigami.Units.gridUnit * 15
model: [i18n("Plasma: Global icon theme"), i18n("Breeze: Implicit Breeze icons"), i18n("Aurorae: Window decorations theme")]
}

RowLayout {
Expand Down
6 changes: 3 additions & 3 deletions package/contents/ui/config/ConfigBehavior.qml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ KCM.SimpleKCM {
anchors.right: parent.right
text: i18n("Some functionality is unsupported or can work unstable in X11 sessions.")
type: Kirigami.MessageType.Warning
visible: !Utils.isWayland()
visible: Utils.isX11()
}

RowLayout {
Expand Down Expand Up @@ -154,7 +154,7 @@ KCM.SimpleKCM {
anchors.right: parent.right
text: i18n("Window Move action is incompatible with Mouse Drag in X11 sessions.")
type: Kirigami.MessageType.Error
visible: !Utils.isWayland() && leftButtonDragAction.currentValue == "Window Move"
visible: Utils.isX11() && leftButtonDragAction.currentValue == "Window Move"
}

KWinShortcutComboBox {
Expand All @@ -171,7 +171,7 @@ KCM.SimpleKCM {
anchors.right: parent.right
text: i18n("Window Move action is incompatible with Mouse Drag in X11 sessions.")
type: Kirigami.MessageType.Error
visible: !Utils.isWayland() && middleButtonDragAction.currentValue == "Window Move"
visible: Utils.isX11() && middleButtonDragAction.currentValue == "Window Move"
}

KWinShortcutComboBox {
Expand Down
6 changes: 3 additions & 3 deletions package/contents/ui/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
* SPDX-License-Identifier: GPL-3.0-or-later
*/

function isWayland() {
const isWaylandPlugin = Qt.platform.pluginName == "wayland";
return isWaylandPlugin;
function isX11() {
const isX11Plugin = Qt.platform.pluginName == "xcb";
return isX11Plugin;
}

function copyLayoutConstraint(from, to) {
Expand Down

0 comments on commit e666de0

Please sign in to comment.