Add a notch island style and tidy the Notch settings page
Islands can float (as before), sit on rounded pills or hang from the top edge like the notch, both in the notch colour. The Notch page now runs Notch, Islands, Open notch, Colour, Animation, and the colour change speed only shows when it does something (glassy when open). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
049ce180da
commit
a0de1d2c41
4 files changed
+148
-123
No files matched your search
+41
-24
@@ -106,34 +106,51 @@ PanelWindow {
|
||||
}
|
||||
}
|
||||
// Notch mode -------------------------------------------------------------
|
||||
GlassPanel {
|
||||
id: leftIsland
|
||||
// No bar behind the modules in notch mode: they float on their own.
|
||||
color: Theme.transparent
|
||||
border.width: 0
|
||||
// Side islands: "float" leaves the modules on the wallpaper, "pill" puts
|
||||
// them on rounded pills and "notch" hangs them from the top edge like the
|
||||
// centre notch. Both use the notch's fill.
|
||||
readonly property string islandStyle: ConfigService.ready ? ConfigService.data.notch.islandStyle : "float"
|
||||
component Island: GlassPanel {
|
||||
id: island
|
||||
property alias row: islandRow
|
||||
property string side
|
||||
readonly property bool hanging: root.islandStyle === "notch"
|
||||
color: root.islandStyle === "pill" ? Theme.notchFill : Theme.transparent
|
||||
border.width: root.islandStyle === "pill" ? 1 : 0
|
||||
plain: true
|
||||
visible: root.notch && ConfigService.ready && ConfigService.data.notch.left.length > 0
|
||||
x: root.outerMargin
|
||||
visible: root.notch && ConfigService.ready && ConfigService.data.notch[side].length > 0
|
||||
// Hanging islands keep their ears on screen.
|
||||
x: {
|
||||
const inset = root.outerMargin + (hanging ? BarDrawers.ear : 0);
|
||||
return side === "left" ? inset : root.width - inset - width;
|
||||
}
|
||||
y: root.islandY
|
||||
width: leftRow.implicitWidth + 12
|
||||
width: islandRow.implicitWidth + (root.islandStyle === "float" ? 12 : 24)
|
||||
height: BarDrawers.height
|
||||
radius: BarDrawers.radius
|
||||
ModuleRow { id: leftRow; position: "left"; active: root.notch; modules: BarLayout.notchModules(root.screen ? root.screen.name : "", "left"); barScreen: root.screen; anchors.left: parent.left; anchors.leftMargin: 6; anchors.verticalCenter: parent.verticalCenter }
|
||||
}
|
||||
GlassPanel {
|
||||
id: rightIsland
|
||||
// No bar behind the modules in notch mode: they float on their own.
|
||||
color: Theme.transparent
|
||||
border.width: 0
|
||||
plain: true
|
||||
visible: root.notch && ConfigService.ready && ConfigService.data.notch.right.length > 0
|
||||
x: root.width - root.outerMargin - width
|
||||
y: root.islandY
|
||||
width: rightRow.implicitWidth + 12
|
||||
height: BarDrawers.height
|
||||
radius: BarDrawers.radius
|
||||
ModuleRow { id: rightRow; position: "right"; active: root.notch; modules: BarLayout.notchModules(root.screen ? root.screen.name : "", "right"); barScreen: root.screen; anchors.right: parent.right; anchors.rightMargin: 6; anchors.verticalCenter: parent.verticalCenter }
|
||||
radius: root.islandStyle === "pill" ? height / 2 : BarDrawers.radius
|
||||
DrawerShape {
|
||||
z: -1
|
||||
visible: island.hanging
|
||||
x: -BarDrawers.ear
|
||||
y: -island.y
|
||||
bodyWidth: island.width
|
||||
bodyHeight: BarDrawers.bottom
|
||||
ear: BarDrawers.ear
|
||||
radius: Math.min(Theme.radius, BarDrawers.bottom / 2)
|
||||
fillColor: Theme.notchFill
|
||||
}
|
||||
ModuleRow {
|
||||
id: islandRow
|
||||
position: island.side
|
||||
active: root.notch
|
||||
modules: BarLayout.notchModules(root.screen ? root.screen.name : "", island.side)
|
||||
barScreen: root.screen
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
}
|
||||
}
|
||||
Island { id: leftIsland; side: "left" }
|
||||
Island { id: rightIsland; side: "right" }
|
||||
NotchPill {
|
||||
id: notchPill
|
||||
barScreen: root.screen
|
||||
|
||||
Reference in new issue
Block a user