quickshell: fix bottom-right concave ear position
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
d6bbf44566
commit
b0f2b9bfd4
1 changed files with 11 additions and 14 deletions
|
|
@ -1185,8 +1185,8 @@ in
|
|||
anchor.adjustment: alignRight ? PopupAdjustment.None : PopupAdjustment.Slide
|
||||
visible: false
|
||||
color: "transparent"
|
||||
implicitWidth: alignRight ? fullWidth + 8 + 20 : fullWidth + 16
|
||||
implicitHeight: alignRight ? fullHeight + 4 + 8 : fullHeight + 4
|
||||
implicitWidth: fullWidth + (alignRight ? 8 : 16)
|
||||
implicitHeight: fullHeight + 4 + (alignRight ? 8 : 0)
|
||||
|
||||
onVisibleChanged: {
|
||||
if (visible) {
|
||||
|
|
@ -1267,17 +1267,16 @@ in
|
|||
|
||||
Rectangle {
|
||||
id: _dropdownRect
|
||||
anchors.left: dropdown.alignRight ? undefined : undefined
|
||||
anchors.right: dropdown.alignRight ? parent.right : undefined
|
||||
anchors.horizontalCenter: dropdown.alignRight ? undefined : parent.horizontalCenter
|
||||
anchors.top: parent.top
|
||||
width: dropdown.alignRight ? dropdown.fullWidth + 20 : dropdown.fullWidth
|
||||
width: dropdown.fullWidth
|
||||
height: dropdown.open ? dropdown.fullHeight : 0
|
||||
color: Theme.barBg
|
||||
radius: 8
|
||||
topLeftRadius: 0
|
||||
topRightRadius: 0
|
||||
bottomRightRadius: 0
|
||||
bottomRightRadius: dropdown.alignRight ? 0 : 8
|
||||
clip: true
|
||||
|
||||
Behavior on height {
|
||||
|
|
@ -1286,20 +1285,17 @@ in
|
|||
|
||||
Item {
|
||||
id: dropdownContent
|
||||
anchors.left: parent.left
|
||||
anchors.top: parent.top
|
||||
anchors.bottom: parent.bottom
|
||||
width: dropdown.fullWidth
|
||||
anchors.fill: parent
|
||||
}
|
||||
}
|
||||
|
||||
// Bottom concave ear on right edge
|
||||
// Bottom-right concave ear — connects dropdown bottom to right screen edge
|
||||
Item {
|
||||
visible: dropdown.alignRight && _dropdownRect.height > 0
|
||||
anchors.right: parent.right
|
||||
y: _dropdownRect.height
|
||||
anchors.right: _dropdownRect.right
|
||||
anchors.top: _dropdownRect.bottom
|
||||
width: 8
|
||||
height: 8
|
||||
height: Math.min(8, _dropdownRect.height)
|
||||
clip: true
|
||||
Canvas {
|
||||
width: 8; height: 8
|
||||
|
|
@ -1308,7 +1304,8 @@ in
|
|||
ctx.clearRect(0, 0, 8, 8);
|
||||
ctx.fillStyle = Theme.barBg;
|
||||
ctx.beginPath();
|
||||
ctx.moveTo(8, 0); ctx.lineTo(8, 8); ctx.lineTo(0, 8);
|
||||
// Fill top-right triangle with concave arc
|
||||
ctx.moveTo(8, 0); ctx.lineTo(8, 8);
|
||||
ctx.arc(0, 0, 8, Math.PI / 2, 0, true);
|
||||
ctx.closePath(); ctx.fill();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue