quickshell: border only on bar bottom + dropdown sides/bottom

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
rope 2026-05-27 15:53:51 +01:00
parent 32f3d39610
commit 17b85a13bb

View file

@ -649,20 +649,31 @@ in
anchors.right: parent.right
height: 30
color: Theme.barBg
border.width: 1
border.color: Theme.base03
}
// Cover bar bottom border where dropdown connects
// Bar bottom border left segment (up to dropdown gap)
Rectangle {
visible: activeDropdown && activeDropdown.visible
x: activeDropdown ? (activeDropdown.alignRight
? activeDropdown.x + activeDropdown.width - activeDropdown.fullWidth
: activeDropdown.x + 8) : 0
y: 29
width: activeDropdown ? activeDropdown.fullWidth : 0
height: 2
color: Theme.barBg
id: barBorderLeft
x: 0; y: 30
width: {
if (!activeDropdown || !activeDropdown.visible) return bar.width;
if (activeDropdown.alignRight)
return activeDropdown.x + activeDropdown.width - activeDropdown.fullWidth - 8;
return activeDropdown.x + 8;
}
height: 1
color: Theme.base03
}
// Bar bottom border right segment (after dropdown gap)
Rectangle {
id: barBorderRight
visible: activeDropdown && activeDropdown.visible && !activeDropdown.alignRight
x: activeDropdown ? activeDropdown.x + 8 + activeDropdown.fullWidth : 0
y: 30
width: activeDropdown ? bar.width - x : 0
height: 1
color: Theme.base03
}
property var activeDropdown: null
@ -1330,18 +1341,38 @@ in
topLeftRadius: 0
topRightRadius: 0
bottomRightRadius: dropdown.alignRight ? 0 : 8
border.width: 1
border.color: Theme.base03
clip: true
// Cover the top border + bar bottom border seam
// Left border
Rectangle {
anchors.left: parent.left
anchors.top: parent.top
anchors.bottom: parent.bottom
anchors.bottomMargin: 8
width: 1
color: Theme.base03
}
// Right border (only for centered dropdowns)
Rectangle {
visible: !dropdown.alignRight
anchors.right: parent.right
anchors.top: parent.top
anchors.bottom: parent.bottom
anchors.bottomMargin: 8
width: 1
color: Theme.base03
}
// Bottom border
Rectangle {
anchors.bottom: parent.bottom
anchors.left: parent.left
anchors.right: parent.right
anchors.leftMargin: dropdown.alignRight ? 0 : 0
height: 2
color: Theme.barBg
anchors.leftMargin: 8
anchors.rightMargin: dropdown.alignRight ? 0 : 8
height: 1
color: Theme.base03
}
Behavior on height {