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:
1 parent
8d9903b65e
commit
049ce180da
1 file changed
+5
-2
@@ -26,6 +26,9 @@ PanelWindow {
|
||||
// Notch mode splits the bar into a left island, the centre notch and a
|
||||
// right island; only those take input.
|
||||
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 {
|
||||
item: root.notch ? leftIsland : panel
|
||||
Region { item: root.notch ? notchPill : null; intersection: Intersection.Combine }
|
||||
@@ -111,7 +114,7 @@ PanelWindow {
|
||||
plain: true
|
||||
visible: root.notch && ConfigService.ready && ConfigService.data.notch.left.length > 0
|
||||
x: root.outerMargin
|
||||
y: root.outerMargin
|
||||
y: root.islandY
|
||||
width: leftRow.implicitWidth + 12
|
||||
height: BarDrawers.height
|
||||
radius: BarDrawers.radius
|
||||
@@ -125,7 +128,7 @@ PanelWindow {
|
||||
plain: true
|
||||
visible: root.notch && ConfigService.ready && ConfigService.data.notch.right.length > 0
|
||||
x: root.width - root.outerMargin - width
|
||||
y: root.outerMargin
|
||||
y: root.islandY
|
||||
width: rightRow.implicitWidth + 12
|
||||
height: BarDrawers.height
|
||||
radius: BarDrawers.radius
|
||||
|
||||
Reference in new issue
Block a user