From b0f2b9bfd43ad88288354bfefb8a4c5d0da7e3c6 Mon Sep 17 00:00:00 2001 From: rope Date: Wed, 27 May 2026 10:01:38 +0100 Subject: [PATCH] quickshell: fix bottom-right concave ear position Co-Authored-By: Claude Opus 4.6 --- settings/hyprland.nix | 25 +++++++++++-------------- 1 file changed, 11 insertions(+), 14 deletions(-) diff --git a/settings/hyprland.nix b/settings/hyprland.nix index 64274ea..190b86b 100644 --- a/settings/hyprland.nix +++ b/settings/hyprland.nix @@ -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(); }