quickshell: border only on bar bottom + dropdown sides/bottom
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
32f3d39610
commit
17b85a13bb
1 changed files with 48 additions and 17 deletions
|
|
@ -649,20 +649,31 @@ in
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
height: 30
|
height: 30
|
||||||
color: Theme.barBg
|
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 {
|
Rectangle {
|
||||||
visible: activeDropdown && activeDropdown.visible
|
id: barBorderLeft
|
||||||
x: activeDropdown ? (activeDropdown.alignRight
|
x: 0; y: 30
|
||||||
? activeDropdown.x + activeDropdown.width - activeDropdown.fullWidth
|
width: {
|
||||||
: activeDropdown.x + 8) : 0
|
if (!activeDropdown || !activeDropdown.visible) return bar.width;
|
||||||
y: 29
|
if (activeDropdown.alignRight)
|
||||||
width: activeDropdown ? activeDropdown.fullWidth : 0
|
return activeDropdown.x + activeDropdown.width - activeDropdown.fullWidth - 8;
|
||||||
height: 2
|
return activeDropdown.x + 8;
|
||||||
color: Theme.barBg
|
}
|
||||||
|
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
|
property var activeDropdown: null
|
||||||
|
|
@ -1330,18 +1341,38 @@ in
|
||||||
topLeftRadius: 0
|
topLeftRadius: 0
|
||||||
topRightRadius: 0
|
topRightRadius: 0
|
||||||
bottomRightRadius: dropdown.alignRight ? 0 : 8
|
bottomRightRadius: dropdown.alignRight ? 0 : 8
|
||||||
border.width: 1
|
|
||||||
border.color: Theme.base03
|
|
||||||
clip: true
|
clip: true
|
||||||
|
|
||||||
// Cover the top border + bar bottom border seam
|
// Left border
|
||||||
Rectangle {
|
Rectangle {
|
||||||
|
anchors.left: parent.left
|
||||||
anchors.top: parent.top
|
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.left: parent.left
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
anchors.leftMargin: dropdown.alignRight ? 0 : 0
|
anchors.leftMargin: 8
|
||||||
height: 2
|
anchors.rightMargin: dropdown.alignRight ? 0 : 8
|
||||||
color: Theme.barBg
|
height: 1
|
||||||
|
color: Theme.base03
|
||||||
}
|
}
|
||||||
|
|
||||||
Behavior on height {
|
Behavior on height {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue