Add options in desktop containment to toggle icon and text shadows

This commit is contained in:
wackyideas 2024-01-30 19:11:27 +01:00
parent a2a6d2a5ae
commit 82623fca0e
3 changed files with 27 additions and 6 deletions

View file

@ -135,5 +135,13 @@
<label>List of MIME types to filter by.</label>
<default>all/all</default>
</entry>
<entry name="textShadows" type="Bool">
<label>Use drop shadows for icon labels on the desktop.</label>
<default>true</default>
</entry>
<entry name="iconShadows" type="Bool">
<label>Use drop shadows for icons on the desktop.</label>
<default>false</default>
</entry>
</group>
</kcfg>

View file

@ -44,6 +44,9 @@ Item {
property alias cfg_labelWidth: labelWidth.currentIndex
property alias cfg_textLines: textLines.value
property alias cfg_textShadows: textShadows.checked
property alias cfg_iconShadows: iconShadows.checked
readonly property bool lockedByKiosk: !KAuthorized.authorize("editable_desktop_icons")
IconDialog {
@ -299,6 +302,14 @@ Item {
text: i18n("Rename inline by clicking selected item's text")
}
CheckBox {
id: textShadows
text: i18n("Use drop shadows for icon labels on the desktop")
}
CheckBox {
id: iconShadows
text: i18n("Use drop shadows for icons on the desktop")
}
CheckBox {
id: popups
@ -307,12 +318,14 @@ Item {
text: i18n("Folder preview popups")
}
CheckBox {
id: previews
text: i18n("Preview thumbnails")
}
Button {
id: previewSettings
Layout.fillWidth: true

View file

@ -465,7 +465,7 @@ Item {
source: icon
visible: !editor || editor.targetItem != main
visible: (!editor || editor.targetItem != main) && plasmoid.configuration.iconShadows
}
}
@ -480,17 +480,17 @@ Item {
horizontalOffset: 1
verticalOffset: 1
radius: Math.round(4 * PlasmaCore.Units.devicePixelRatio)
samples: radius * 2 + 1
spread: 0.35
radius: Math.round(3 * PlasmaCore.Units.devicePixelRatio)
samples: radius * 2
spread: 0.435
color: "black"
color: "#F9080808"
opacity: model.isHidden ? 0.6 : 1
source: label
visible: !editor || editor.targetItem != main
visible: (!editor || editor.targetItem != main) && plasmoid.configuration.textShadows
}
}