quickshell: remove inner dropdown wrappers

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
rope 2026-05-27 12:23:52 +01:00
parent b3a376cbb3
commit c928cd3ca4

View file

@ -1273,7 +1273,7 @@ in
width: dropdown.fullWidth width: dropdown.fullWidth
height: dropdown.open ? dropdown.fullHeight : 0 height: dropdown.open ? dropdown.fullHeight : 0
color: Theme.barBg color: Theme.barBg
radius: 10 radius: 8
topLeftRadius: 0 topLeftRadius: 0
topRightRadius: 0 topRightRadius: 0
bottomRightRadius: dropdown.alignRight ? 0 : 8 bottomRightRadius: dropdown.alignRight ? 0 : 8
@ -1319,8 +1319,8 @@ in
id: contextMenu id: contextMenu
alignRight: true alignRight: true
property var trayItem: null property var trayItem: null
fullWidth: ctxWrap.width + 8 fullWidth: menuItems.width + 24
fullHeight: ctxWrap.height + 4 fullHeight: menuItems.height + 16
onVisibleChanged: { onVisibleChanged: {
if (!visible) menuOpener.menu = null; if (!visible) menuOpener.menu = null;
@ -1330,21 +1330,10 @@ in
id: menuOpener id: menuOpener
} }
Rectangle { Column {
id: ctxWrap id: menuItems
anchors.horizontalCenter: parent.horizontalCenter anchors.centerIn: parent
anchors.top: parent.top width: 200
width: menuItems.width + 16
height: menuItems.height + 12
radius: 10
color: Theme.base01
Column {
id: menuItems
anchors.centerIn: parent
width: 200
Repeater { Repeater {
model: menuOpener.children model: menuOpener.children
@ -1402,7 +1391,6 @@ in
} }
} }
} }
}
} }
} }
@ -1410,25 +1398,14 @@ in
BarDropdown { BarDropdown {
id: volDropdown id: volDropdown
alignRight: true alignRight: true
fullWidth: volWrap.width + 8 fullWidth: volDropdownCol.width + 28
fullHeight: volWrap.height + 4 fullHeight: volDropdownCol.height + 20
autoCloseMs: 3000 autoCloseMs: 3000
Rectangle { Column {
id: volWrap id: volDropdownCol
anchors.horizontalCenter: parent.horizontalCenter anchors.centerIn: parent
anchors.top: parent.top width: 260
width: volDropdownCol.width + 20
height: volDropdownCol.height + 16
radius: 10
color: Theme.base01
Column {
id: volDropdownCol
anchors.centerIn: parent
width: 260
spacing: 8 spacing: 8
// Master volume // Master volume
@ -1449,7 +1426,7 @@ in
width: parent.width - masterVolLabel.width - 8 width: parent.width - masterVolLabel.width - 8
height: 20 height: 20
radius: 4 radius: 4
color: Theme.base02 color: Theme.base01
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
Rectangle { Rectangle {
@ -1567,7 +1544,7 @@ in
width: parent.width - appVolLabel.width - 8 width: parent.width - appVolLabel.width - 8
height: 16 height: 16
radius: 3 radius: 3
color: Theme.base02 color: Theme.base01
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
Rectangle { Rectangle {
@ -1606,7 +1583,6 @@ in
} }
} }
} }
}
} }
} }
@ -1614,24 +1590,13 @@ in
BarDropdown { BarDropdown {
id: netDropdown id: netDropdown
alignRight: true alignRight: true
fullWidth: netWrap.width + 8 fullWidth: netDropdownCol.width + 28
fullHeight: netWrap.height + 4 fullHeight: netDropdownCol.height + 20
Rectangle { Column {
id: netWrap id: netDropdownCol
anchors.horizontalCenter: parent.horizontalCenter anchors.centerIn: parent
anchors.top: parent.top width: 220
width: netDropdownCol.width + 20
height: netDropdownCol.height + 16
radius: 10
color: Theme.base01
Column {
id: netDropdownCol
anchors.centerIn: parent
width: 220
spacing: 4 spacing: 4
Text { Text {
@ -1759,7 +1724,6 @@ in
} }
} }
} }
}
} }
} }
@ -1768,24 +1732,13 @@ in
BarDropdown { BarDropdown {
id: batteryDropdown id: batteryDropdown
alignRight: true alignRight: true
fullWidth: batWrap.width + 8 fullWidth: batteryDropdownCol.width + 28
fullHeight: batWrap.height + 4 fullHeight: batteryDropdownCol.height + 20
Rectangle { Column {
id: batWrap id: batteryDropdownCol
anchors.horizontalCenter: parent.horizontalCenter anchors.centerIn: parent
anchors.top: parent.top width: 200
width: batteryDropdownCol.width + 20
height: batteryDropdownCol.height + 16
radius: 10
color: Theme.base01
Column {
id: batteryDropdownCol
anchors.centerIn: parent
width: 200
spacing: 8 spacing: 8
Row { Row {
@ -1888,7 +1841,6 @@ in
} }
} }
} }
}
} }
} }
''} ''}
@ -1912,21 +1864,6 @@ in
NumberAnimation { duration: 150; easing.type: Easing.OutCubic } NumberAnimation { duration: 150; easing.type: Easing.OutCubic }
} }
Rectangle {
width: 7 * 32 + 24
height: calWrapCol.height + 16
radius: 10
color: Theme.base01
anchors.horizontalCenter: parent.horizontalCenter
Column {
id: calWrapCol
anchors.horizontalCenter: parent.horizontalCenter
anchors.top: parent.top
anchors.topMargin: 8
spacing: 8
Rectangle { Rectangle {
width: 7 * 32 + 8 width: 7 * 32 + 8
height: calTitle.height + 12 height: calTitle.height + 12
@ -2091,7 +2028,7 @@ in
width: 7 * 32 + 8 width: 7 * 32 + 8
height: notifCol.height + 12 height: notifCol.height + 12
radius: 6 radius: 6
color: Theme.base02 color: Theme.base01
Column { Column {
id: notifCol id: notifCol
@ -2133,9 +2070,9 @@ in
width: actionText.width + 12 width: actionText.width + 12
height: actionText.height + 4 height: actionText.height + 4
radius: 4 radius: 4
color: actionMa.containsMouse ? Theme.base03 : Theme.base02 color: actionMa.containsMouse ? Theme.base02 : Theme.base01
border.width: 1 border.width: 1
border.color: Theme.base03 border.color: Theme.base02
Text { Text {
id: actionText id: actionText
anchors.centerIn: parent anchors.centerIn: parent
@ -2176,8 +2113,6 @@ in
} }
} }
} }
}
}
} }
} }
} }