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,17 +1330,6 @@ in
id: menuOpener id: menuOpener
} }
Rectangle {
id: ctxWrap
anchors.horizontalCenter: parent.horizontalCenter
anchors.top: parent.top
width: menuItems.width + 16
height: menuItems.height + 12
radius: 10
color: Theme.base01
Column { Column {
id: menuItems id: menuItems
anchors.centerIn: parent anchors.centerIn: parent
@ -1404,27 +1393,15 @@ in
} }
} }
} }
}
// Volume dropdown // Volume dropdown
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 {
id: volWrap
anchors.horizontalCenter: parent.horizontalCenter
anchors.top: parent.top
width: volDropdownCol.width + 20
height: volDropdownCol.height + 16
radius: 10
color: Theme.base01
Column { Column {
id: volDropdownCol id: volDropdownCol
anchors.centerIn: parent anchors.centerIn: parent
@ -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 {
@ -1608,25 +1585,13 @@ in
} }
} }
} }
}
// Network dropdown // Network dropdown
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 {
id: netWrap
anchors.horizontalCenter: parent.horizontalCenter
anchors.top: parent.top
width: netDropdownCol.width + 20
height: netDropdownCol.height + 16
radius: 10
color: Theme.base01
Column { Column {
id: netDropdownCol id: netDropdownCol
@ -1761,26 +1726,14 @@ in
} }
} }
} }
}
${lib.optionalString isMacbook '' ${lib.optionalString isMacbook ''
// Battery dropdown // Battery dropdown
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 {
id: batWrap
anchors.horizontalCenter: parent.horizontalCenter
anchors.top: parent.top
width: batteryDropdownCol.width + 20
height: batteryDropdownCol.height + 16
radius: 10
color: Theme.base01
Column { Column {
id: batteryDropdownCol id: batteryDropdownCol
@ -1890,7 +1843,6 @@ in
} }
} }
} }
}
''} ''}
// Calendar popup // Calendar popup
@ -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
@ -2179,8 +2116,6 @@ in
} }
} }
} }
}
}
''; '';
}; };