Commit 097ad69d authored by Benjamin Port's avatar Benjamin Port
Browse files

Add immutability to KCM Icons

Summary: Add immutability to KCM Icons, disable theme delegate and not the whole grid in order to allow user to change icon size if not immutable too

Test Plan: Add [$i] to kdeglobals key

Reviewers: #plasma, ervin, ngraham, crossi, meven

Subscribers: broulik, plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D26045
parent 9dacd46f
......@@ -110,7 +110,7 @@ QtControls.Popup {
to: sizes.length - 1
stepSize: 1.0
snapMode: QtControls.Slider.SnapAlways
enabled: sizes.length > 0
enabled: sizes.length > 0 && !kcm.iconsSettings.isImmutable(iconTypeList.currentItem.configKey)
onMoved: {
kcm.iconsSettings[iconTypeList.currentItem.configKey] = iconSizeSlider.sizes[iconSizeSlider.value] || 0
......
......@@ -36,8 +36,10 @@ KCM.GridViewKCM {
view.model: kcm.iconsModel
view.currentIndex: kcm.pluginIndex(kcm.iconsSettings.theme)
enabled: !kcm.downloadingFile
view.enabled: !kcm.iconsSettings.isImmutable("Theme")
DropArea {
enabled: !kcm.iconsSettings.isImmutable("Theme")
anchors.fill: parent
onEntered: {
if (!drag.hasUrls) {
......@@ -242,6 +244,7 @@ KCM.GridViewKCM {
}
QtControls.Button {
enabled: !kcm.iconsSettings.isImmutable("Theme")
id: installFromFileButton
text: i18n("Install from File...")
icon.name: "document-import"
......@@ -249,6 +252,7 @@ KCM.GridViewKCM {
}
QtControls.Button {
enabled: !kcm.iconsSettings.isImmutable("Theme")
text: i18n("Get New Icons...")
icon.name: "get-hot-new-stuff"
onClicked: kcm.getNewStuff(this)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment