Centre the notch-mode islands on the notch's clock

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
mxandClaude Opus 5.5 committed 2026-11-14 17:21:43 +01:00
1 parent 8d9903b65e
commit 049ce180da
1 file changed
+5 -2
+5 -2
View File
@@ -26,6 +26,9 @@ PanelWindow {
// Notch mode splits the bar into a left island, the centre notch and a // Notch mode splits the bar into a left island, the centre notch and a
// right island; only those take input. // right island; only those take input.
readonly property bool notch: ShellState.notchMode readonly property bool notch: ShellState.notchMode
// The islands share the notch's centre line (the notch runs from the top
// edge to the bar's bottom), so they line up with its clock.
readonly property int islandY: Math.round((BarDrawers.bottom - BarDrawers.height) / 2)
mask: Region { mask: Region {
item: root.notch ? leftIsland : panel item: root.notch ? leftIsland : panel
Region { item: root.notch ? notchPill : null; intersection: Intersection.Combine } Region { item: root.notch ? notchPill : null; intersection: Intersection.Combine }
@@ -111,7 +114,7 @@ PanelWindow {
plain: true plain: true
visible: root.notch && ConfigService.ready && ConfigService.data.notch.left.length > 0 visible: root.notch && ConfigService.ready && ConfigService.data.notch.left.length > 0
x: root.outerMargin x: root.outerMargin
y: root.outerMargin y: root.islandY
width: leftRow.implicitWidth + 12 width: leftRow.implicitWidth + 12
height: BarDrawers.height height: BarDrawers.height
radius: BarDrawers.radius radius: BarDrawers.radius
@@ -125,7 +128,7 @@ PanelWindow {
plain: true plain: true
visible: root.notch && ConfigService.ready && ConfigService.data.notch.right.length > 0 visible: root.notch && ConfigService.ready && ConfigService.data.notch.right.length > 0
x: root.width - root.outerMargin - width x: root.width - root.outerMargin - width
y: root.outerMargin y: root.islandY
width: rightRow.implicitWidth + 12 width: rightRow.implicitWidth + 12
height: BarDrawers.height height: BarDrawers.height
radius: BarDrawers.radius radius: BarDrawers.radius