Changeset View
Changeset View
Standalone View
Standalone View
kcms/style/package/contents/ui/EffectSettingsPopup.qml
Show All 36 Lines | 27 | QtControls.Popup { | |||
---|---|---|---|---|---|
37 | Kirigami.FormLayout { | 37 | Kirigami.FormLayout { | ||
38 | // Popup's autosizing causes FormLayout to collapse when opening it a second time :( | 38 | // Popup's autosizing causes FormLayout to collapse when opening it a second time :( | ||
39 | wideMode: true | 39 | wideMode: true | ||
40 | 40 | | |||
41 | QtControls.CheckBox { | 41 | QtControls.CheckBox { | ||
42 | id: iconsOnButtonsCheckBox | 42 | id: iconsOnButtonsCheckBox | ||
43 | Kirigami.FormData.label: i18n("Show icons:") | 43 | Kirigami.FormData.label: i18n("Show icons:") | ||
44 | text: i18n("On buttons") | 44 | text: i18n("On buttons") | ||
45 | enabled: !kcm.styleSettings.isImmutable("iconsOnButtons") | ||||
45 | checked: kcm.styleSettings.iconsOnButtons | 46 | checked: kcm.styleSettings.iconsOnButtons | ||
46 | onClicked: kcm.styleSettings.iconsOnButtons = checked | 47 | onClicked: kcm.styleSettings.iconsOnButtons = checked | ||
47 | } | 48 | } | ||
48 | 49 | | |||
49 | QtControls.CheckBox { | 50 | QtControls.CheckBox { | ||
50 | text: i18n("In menus") | 51 | text: i18n("In menus") | ||
52 | enabled: !kcm.styleSettings.isImmutable("iconsInMenus") | ||||
51 | checked: kcm.styleSettings.iconsInMenus | 53 | checked: kcm.styleSettings.iconsInMenus | ||
52 | onClicked: kcm.styleSettings.iconsInMenus = checked | 54 | onClicked: kcm.styleSettings.iconsInMenus = checked | ||
53 | } | 55 | } | ||
54 | 56 | | |||
55 | QtControls.ComboBox { | 57 | QtControls.ComboBox { | ||
56 | id: mainToolBarStyleCombo | 58 | id: mainToolBarStyleCombo | ||
59 | enabled: !kcm.styleSettings.isImmutable("toolButtonStyle") | ||||
57 | Kirigami.FormData.label: i18n("Main toolbar label:") | 60 | Kirigami.FormData.label: i18n("Main toolbar label:") | ||
58 | model: [ | 61 | model: [ | ||
59 | {text: i18n("None"), value: Private.KCM.NoText}, | 62 | {text: i18n("None"), value: Private.KCM.NoText}, | ||
60 | {text: i18n("Text only"), value: Private.KCM.TextOnly}, | 63 | {text: i18n("Text only"), value: Private.KCM.TextOnly}, | ||
61 | {text: i18n("Beside icons"), value: Private.KCM.TextBesideIcon}, | 64 | {text: i18n("Beside icons"), value: Private.KCM.TextBesideIcon}, | ||
62 | {text: i18n("Below icon"), value: Private.KCM.TextUnderIcon} | 65 | {text: i18n("Below icon"), value: Private.KCM.TextUnderIcon} | ||
63 | ] | 66 | ] | ||
64 | textRole: "text" | 67 | textRole: "text" | ||
65 | currentIndex: model.findIndex(function (item) { | 68 | currentIndex: model.findIndex(function (item) { | ||
66 | return item.value === kcm.mainToolBarStyle | 69 | return item.value === kcm.mainToolBarStyle | ||
67 | }) | 70 | }) | ||
68 | onActivated: kcm.mainToolBarStyle = model[currentIndex].value | 71 | onActivated: kcm.mainToolBarStyle = model[currentIndex].value | ||
69 | } | 72 | } | ||
70 | 73 | | |||
71 | QtControls.ComboBox { | 74 | QtControls.ComboBox { | ||
75 | enabled: !kcm.styleSettings.isImmutable("toolButtonStyleOtherToolbars") | ||||
72 | Kirigami.FormData.label: i18n("Secondary toolbar label:") | 76 | Kirigami.FormData.label: i18n("Secondary toolbar label:") | ||
73 | model: mainToolBarStyleCombo.model | 77 | model: mainToolBarStyleCombo.model | ||
74 | textRole: "text" | 78 | textRole: "text" | ||
75 | currentIndex: model.findIndex(function (item) { | 79 | currentIndex: model.findIndex(function (item) { | ||
76 | return item.value === kcm.otherToolBarStyle | 80 | return item.value === kcm.otherToolBarStyle | ||
77 | }) | 81 | }) | ||
78 | onActivated: kcm.otherToolBarStyle = model[currentIndex].value | 82 | onActivated: kcm.otherToolBarStyle = model[currentIndex].value | ||
79 | } | 83 | } | ||
80 | } | 84 | } | ||
81 | } | 85 | } |