Home
Phabricator
Search
Log In
Files
F8182687
folderview_work.patch
pereira.alex (Alexandre Pereira)
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Author
pereira.alex
Created
Mar 18 2020, 11:24 AM
Size
3 KB
Mime Type
text/x-diff
Engine
blob
Format
Raw Data
Handle
5240105
Attached To
D28057: Fix folderview popup mode list view icon size inheriting icon view icon size
folderview_work.patch
View Options
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
Log In to Comment