quickshell: fix dropdown sizing to match wrapper rects

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
rope 2026-05-27 11:33:43 +01:00
parent dfc4a6b509
commit 3752a13d92

View file

@ -1319,8 +1319,8 @@ in
id: contextMenu
alignRight: true
property var trayItem: null
fullWidth: menuItems.width + 16
fullHeight: menuItems.height + 12
fullWidth: ctxWrap.width + 8
fullHeight: ctxWrap.height + 10
onVisibleChanged: {
if (!visible) menuOpener.menu = null;
@ -1331,9 +1331,10 @@ in
}
Rectangle {
id: ctxWrap
anchors.horizontalCenter: parent.horizontalCenter
anchors.top: parent.top
anchors.topMargin: 6
anchors.topMargin: 4
width: menuItems.width + 16
height: menuItems.height + 12
radius: 10
@ -1408,14 +1409,15 @@ in
BarDropdown {
id: volDropdown
alignRight: true
fullWidth: volDropdownCol.width + 24
fullHeight: volDropdownCol.height + 16
fullWidth: volWrap.width + 8
fullHeight: volWrap.height + 10
autoCloseMs: 3000
Rectangle {
id: volWrap
anchors.horizontalCenter: parent.horizontalCenter
anchors.top: parent.top
anchors.topMargin: 8
anchors.topMargin: 4
width: volDropdownCol.width + 20
height: volDropdownCol.height + 16
radius: 10
@ -1610,13 +1612,14 @@ in
BarDropdown {
id: netDropdown
alignRight: true
fullWidth: netDropdownCol.width + 24
fullHeight: netDropdownCol.height + 16
fullWidth: netWrap.width + 8
fullHeight: netWrap.height + 10
Rectangle {
id: netWrap
anchors.horizontalCenter: parent.horizontalCenter
anchors.top: parent.top
anchors.topMargin: 8
anchors.topMargin: 4
width: netDropdownCol.width + 20
height: netDropdownCol.height + 16
radius: 10
@ -1762,13 +1765,14 @@ in
BarDropdown {
id: batteryDropdown
alignRight: true
fullWidth: batteryDropdownCol.width + 24
fullHeight: batteryDropdownCol.height + 16
fullWidth: batWrap.width + 8
fullHeight: batWrap.height + 10
Rectangle {
id: batWrap
anchors.horizontalCenter: parent.horizontalCenter
anchors.top: parent.top
anchors.topMargin: 8
anchors.topMargin: 4
width: batteryDropdownCol.width + 20
height: batteryDropdownCol.height + 16
radius: 10
@ -1889,14 +1893,14 @@ in
BarDropdown {
id: calPopup
dropdownX: bar.width / 2
fullWidth: calCol.width + 32
fullHeight: calCol.height + 24
fullWidth: calCol.width + 8
fullHeight: calCol.height + 10
Column {
id: calCol
anchors.horizontalCenter: parent.horizontalCenter
anchors.top: parent.top
anchors.topMargin: 12
anchors.topMargin: 4
spacing: 8
opacity: calPopup.open ? 1.0 : 0.0