quickshell: simplify right-edge dropdown flush to screen
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
c2bd45944f
commit
0f51a3fa49
1 changed files with 2 additions and 35 deletions
|
|
@ -1185,8 +1185,8 @@ in
|
|||
anchor.adjustment: PopupAdjustment.Slide
|
||||
visible: false
|
||||
color: "transparent"
|
||||
implicitWidth: alignRight ? fullWidth + 8 + 8 : fullWidth + 16
|
||||
implicitHeight: alignRight ? fullHeight + 4 + 8 : fullHeight + 4
|
||||
implicitWidth: fullWidth + (alignRight ? 8 : 16)
|
||||
implicitHeight: fullHeight + 4
|
||||
|
||||
onVisibleChanged: {
|
||||
if (visible) {
|
||||
|
|
@ -1265,42 +1265,9 @@ in
|
|||
}
|
||||
}
|
||||
|
||||
// Right-edge strip — fills from dropdown to screen edge
|
||||
Rectangle {
|
||||
visible: dropdown.alignRight
|
||||
anchors.left: _dropdownRect.right
|
||||
anchors.top: parent.top
|
||||
anchors.right: parent.right
|
||||
height: _dropdownRect.height
|
||||
color: Theme.barBg
|
||||
}
|
||||
|
||||
// Right-edge bottom ear — concave curve at bottom of right edge strip
|
||||
Item {
|
||||
visible: dropdown.alignRight && _dropdownRect.height > 0
|
||||
anchors.right: parent.right
|
||||
anchors.top: _dropdownRect.bottom
|
||||
width: 8
|
||||
height: 8
|
||||
clip: true
|
||||
Canvas {
|
||||
width: 8; height: 8
|
||||
onPaint: {
|
||||
var ctx = getContext("2d");
|
||||
ctx.clearRect(0, 0, 8, 8);
|
||||
ctx.fillStyle = Theme.barBg;
|
||||
ctx.beginPath();
|
||||
ctx.moveTo(8, 0); ctx.lineTo(8, 8);
|
||||
ctx.arc(0, 0, 8, 0, Math.PI / 2, false);
|
||||
ctx.closePath(); ctx.fill();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
id: _dropdownRect
|
||||
anchors.right: dropdown.alignRight ? parent.right : undefined
|
||||
anchors.rightMargin: dropdown.alignRight ? 8 : 0
|
||||
anchors.horizontalCenter: dropdown.alignRight ? undefined : parent.horizontalCenter
|
||||
anchors.top: parent.top
|
||||
width: dropdown.fullWidth
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue