1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-01-24 21:42:51 -05:00

Fix spacing of night mode + auto wallpaper sections

This commit is contained in:
bbedward
2025-10-14 10:05:04 -04:00
parent ee755b8bd6
commit 811daf74ff
3 changed files with 171 additions and 165 deletions

View File

@@ -20,11 +20,12 @@ Item {
property int popupWidth: 0
property bool alignPopupRight: false
property int dropdownWidth: 200
property bool compactMode: text === "" && description === ""
signal valueChanged(string value)
width: parent.width
implicitHeight: Math.max(60, labelColumn.implicitHeight + Theme.spacingM)
width: compactMode ? dropdownWidth : parent.width
implicitHeight: compactMode ? 40 : Math.max(60, labelColumn.implicitHeight + Theme.spacingM)
Component.onDestruction: {
const popup = dropdownMenu
@@ -41,6 +42,7 @@ Item {
anchors.verticalCenter: parent.verticalCenter
anchors.rightMargin: Theme.spacingL
spacing: Theme.spacingXS
visible: !root.compactMode
StyledText {
text: root.text
@@ -62,7 +64,7 @@ Item {
Rectangle {
id: dropdown
width: root.popupWidth === -1 ? undefined : (root.popupWidth > 0 ? root.popupWidth : root.dropdownWidth)
width: root.compactMode ? parent.width : (root.popupWidth === -1 ? undefined : (root.popupWidth > 0 ? root.popupWidth : root.dropdownWidth))
height: 40
anchors.right: parent.right
anchors.verticalCenter: parent.verticalCenter