Skip to content

Commit 533a377

Browse files
committed
#6: disable Aurorae themes combobox when the model is empty
1 parent e666de0 commit 533a377

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

package/contents/ui/config/ConfigAppearance.qml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ KCM.SimpleKCM {
6060
ComboBox {
6161
id: widgetButtonsIconsTheme
6262

63-
Kirigami.FormData.label: i18n("Icons theme:")
63+
Kirigami.FormData.label: i18n("Button icons source:")
6464
Layout.minimumWidth: Kirigami.Units.gridUnit * 15
6565
model: [i18n("Plasma: Global icon theme"), i18n("Breeze: Implicit Breeze icons"), i18n("Aurorae: Window decorations theme")]
6666
}
@@ -76,17 +76,16 @@ KCM.SimpleKCM {
7676
}
7777

7878
Layout.minimumWidth: Kirigami.Units.gridUnit * 15
79-
enabled: widgetButtonsIconsTheme.currentIndex == 2
79+
enabled: widgetButtonsIconsTheme.currentIndex == 2 && model.count > 0
8080
Component.onCompleted: updateCurrentIndex()
8181
onActivated: cfg_widgetButtonsAuroraeTheme = currentValue
82-
displayText: !!currentText ? currentText : (model.count) > 0 ? i18n("<Select Aurorae theme>") : i18n("<Aurorae themes not found>")
82+
displayText: !!currentText ? currentText : (model.count > 0) ? i18n("<Select Aurorae theme>") : i18n("<Aurorae themes not found>")
8383
textRole: "name"
8484
valueRole: "folder"
8585
model: kWinConfig.auroraeThemes
8686
}
8787

8888
KCM.ContextualHelpButton {
89-
enabled: widgetButtonsIconsTheme.currentIndex == 2
9089
toolTipText: i18n("Some window decoration themes <br/>
9190
(e.g. Breeze or Plastic) could be installed <br/>
9291
in your system as binary libraries and <br/>

0 commit comments

Comments
 (0)