1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-01-29 16:02:51 -05:00

feat: Implement drag & drop topbar widget sections in settings

This commit is contained in:
purian23
2025-08-01 12:29:21 -04:00
parent ce9f4efb5d
commit f66b5181ce
9 changed files with 1601 additions and 187 deletions

View File

@@ -10,23 +10,24 @@ Item {
property bool toggling: false
property string text: ""
property string description: ""
property bool hideText: false
signal clicked()
signal toggled(bool checked)
width: text ? parent.width : 48
height: text ? 60 : 24
width: (text && !hideText) ? parent.width : 48
height: (text && !hideText) ? 60 : 24
StyledRect {
id: background
anchors.fill: parent
radius: toggle.text ? Theme.cornerRadius : 0
color: toggle.text ? Theme.surfaceHover : "transparent"
visible: toggle.text
radius: (toggle.text && !toggle.hideText) ? Theme.cornerRadius : 0
color: (toggle.text && !toggle.hideText) ? Theme.surfaceHover : "transparent"
visible: (toggle.text && !toggle.hideText)
StateLayer {
visible: toggle.text
visible: (toggle.text && !toggle.hideText)
disabled: !toggle.enabled
stateColor: Theme.primary
cornerRadius: parent.radius
@@ -50,7 +51,7 @@ Item {
anchors.leftMargin: Theme.spacingM
anchors.rightMargin: Theme.spacingM
spacing: Theme.spacingXS
visible: toggle.text
visible: (toggle.text && !toggle.hideText)
Column {
anchors.verticalCenter: parent.verticalCenter