File Metadata

Author
pereira.alex
Created
Mar 18 2020, 11:24 AM

folderview_work.patch

diff --git a/containments/desktop/package/contents/config/main.xml b/containments/desktop/package/contents/config/main.xml
index f507c197b..063fed7a6 100644
--- a/containments/desktop/package/contents/config/main.xml
+++ b/containments/desktop/package/contents/config/main.xml
@@ -99,11 +99,11 @@
<default>0</default>
</entry>
<entry name="iconSize" type="Int">
- <label>The icon size to use for Folder View icons. One of the list of Plasma icon sizes.</label>
+ <label>The icon size to use for Icon Mode Folder View icons. One of the list of Plasma icon sizes.</label>
<default>4</default>
</entry>
<entry name="listViewIconSize" type="Int">
- <label>The icon size to use for List View icons. One of the list of Plasma icon sizes.</label>
+ <label>The icon size to use for List Mode Folder View icons. One of the list of Plasma icon sizes.</label>
<default>1</default>
</entry>
<entry name="labelWidth" type="Int">
diff --git a/containments/desktop/package/contents/ui/ConfigIcons.qml b/containments/desktop/package/contents/ui/ConfigIcons.qml
index d6621d8f1..6342a9304 100644
--- a/containments/desktop/package/contents/ui/ConfigIcons.qml
+++ b/containments/desktop/package/contents/ui/ConfigIcons.qml
@@ -51,12 +51,13 @@ Item {
property alias cfg_popups: popups.checked
property alias cfg_previews: previews.checked
property alias cfg_previewPlugins: previewPluginsDialog.previewPlugins
- property alias cfg_viewMode: viewMode.currentIndex
- property alias cfg_iconSize: iconSize.value
- property alias cfg_listViewIconSize: listViewIconSize.value
+ property alias cfg_viewMode: viewMode.currentIndex
property alias cfg_labelWidth: labelWidth.currentIndex
property alias cfg_textLines: textLines.value
+ property int cfg_listViewIconSize
+ property int cfg_iconSize
+
readonly property bool lockedByKiosk: !KAuthorized.authorize("editable_desktop_icons")
IconDialog {
@@ -225,19 +226,7 @@ Item {
// Size section
Slider {
id: iconSize
- visible: !isPopup || viewMode.currentIndex === 1
- Layout.fillWidth: true
-
- Kirigami.FormData.label: i18n("Icon size:")
-
- from: 0
- to: 5
- stepSize: 1
- snapMode: Slider.SnapAlways
- }
- Slider {
- id: listViewIconSize
- visible: isPopup && viewMode.currentIndex === 0
+ value: viewMode.currentIndex === 1 ? cfg_iconSize : cfg_listViewIconSize
Layout.fillWidth: true
Kirigami.FormData.label: i18n("Icon size:")
@@ -246,7 +235,16 @@ Item {
to: 5
stepSize: 1
snapMode: Slider.SnapAlways
- }
+
+ onValueChanged: {
+ if (viewMode.currentIndex === 1) {
+ cfg_iconSize = iconSize.value;
+ }
+ else {
+ cfg_listViewIconSize = iconSize.value;
+ }
+ }
+ }
RowLayout {
Layout.fillWidth: true