Refine notch mode: own island modules, Super+N, fuller pages, header strip
- Notch islands and a header strip in the open notch take their own module lists (Settings → Notch → Modules); the strip scrolls sideways on wheel. - `glassmxrph notch mode` swaps notch mode and the full bar. - The left column fills its space: large media player (streams show LIVE), a full-height Performance card and a clock over the calendar. - A cog edits the tiles in the Control Center editor, then the notch returns. - The launcher uses the notch shape and keeps its mode pills inside. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
5217af4f67
commit
74b6ad50ec
14 files changed
+530
-99
No files matched your search
@@ -2,7 +2,6 @@ pragma ComponentBehavior: Bound
|
||||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
import QtQuick.Shapes
|
||||
import Quickshell
|
||||
import Quickshell.Wayland
|
||||
import "../components"
|
||||
@@ -73,14 +72,15 @@ PanelWindow {
|
||||
// Room is kept for the mode pills on the right of the bar.
|
||||
readonly property int pillSize: 48
|
||||
readonly property real pillsWidth: 2 * pillSize + 2 * 10
|
||||
readonly property real targetWidth: Math.min(options.width, root.width - 40 - 2 * pillsWidth)
|
||||
readonly property real targetWidth: Math.min(options.width, root.width - 40 - (notch ? 0 : 2 * pillsWidth))
|
||||
// A hovered mode pill names itself in the empty search bar.
|
||||
property string pillHover: ""
|
||||
readonly property int barHeight: 60
|
||||
// Notch mode: the launcher drops out of the notch at the top edge. The
|
||||
// panel's top corners sit above the screen and concave ears join it there.
|
||||
readonly property bool notch: ShellState.notchMode
|
||||
readonly property real notchInset: notch ? panel.radius : 0
|
||||
// Pills sit inside the search bar in notch mode, smaller.
|
||||
readonly property int notchPill: 36
|
||||
readonly property real maxBodyHeight: Math.min(460, root.height * 0.78 - barHeight - (notch ? 0 : root.height * 0.22))
|
||||
// Clipboard mode shows the latest five rows; the rest scroll.
|
||||
readonly property real clipboardRows: 5 * 48 - 2
|
||||
@@ -197,9 +197,10 @@ PanelWindow {
|
||||
Row {
|
||||
id: pills
|
||||
objectName: "launcherPills"
|
||||
x: panel.x + panel.width + 10
|
||||
y: panel.y + root.notchInset + (root.barHeight - root.pillSize) / 2
|
||||
spacing: 10
|
||||
x: root.notch ? panel.x + panel.width - width - 14 : panel.x + panel.width + 10
|
||||
y: panel.y + (root.barHeight - (root.notch ? root.notchPill : root.pillSize)) / 2
|
||||
z: 1
|
||||
spacing: root.notch ? 6 : 10
|
||||
opacity: panel.opacity
|
||||
scale: panel.scale
|
||||
Repeater {
|
||||
@@ -222,10 +223,12 @@ PanelWindow {
|
||||
required property var modelData
|
||||
readonly property bool active: ShellState.launcherMode === modelData.mode
|
||||
objectName: "launcherPill-" + modelData.mode
|
||||
width: root.pillSize
|
||||
height: root.pillSize
|
||||
width: root.notch ? root.notchPill : root.pillSize
|
||||
height: width
|
||||
radius: width / 2
|
||||
color: active ? Theme.accent : Qt.alpha(Theme.surface, Math.min(1, surfaceOpacity + (pillArea.containsMouse ? 0.18 : 0)))
|
||||
color: active ? Theme.accent : root.notch ? (pillArea.containsMouse ? Theme.hover : Theme.fill) : Qt.alpha(Theme.surface, Math.min(1, surfaceOpacity + (pillArea.containsMouse ? 0.18 : 0)))
|
||||
border.color: root.notch ? Theme.hairline : Theme.border
|
||||
plain: root.notch
|
||||
Accessible.role: Accessible.Button
|
||||
Accessible.name: modelData.label
|
||||
scale: pillArea.pressed ? 0.92 : 1
|
||||
@@ -239,7 +242,7 @@ PanelWindow {
|
||||
anchors.centerIn: parent
|
||||
text: Icons.available ? pill.modelData.glyph : pill.modelData.fallback
|
||||
font.family: Icons.available ? Icons.family : ""
|
||||
font.pixelSize: 21
|
||||
font.pixelSize: root.notch ? 17 : 21
|
||||
color: pill.active ? Theme.accentText : Theme.text
|
||||
}
|
||||
MouseArea {
|
||||
@@ -261,44 +264,29 @@ PanelWindow {
|
||||
}
|
||||
}
|
||||
}
|
||||
// Notch ears: concave fillets joining the panel to the screen's top edge.
|
||||
Repeater {
|
||||
model: root.notch ? [0, 1] : []
|
||||
Shape {
|
||||
id: earShape
|
||||
required property int modelData
|
||||
readonly property real e: BarDrawers.ear
|
||||
x: modelData === 0 ? panel.x - e : panel.x + panel.width
|
||||
y: 0
|
||||
width: e
|
||||
height: e
|
||||
opacity: panel.opacity
|
||||
preferredRendererType: Shape.CurveRenderer
|
||||
ShapePath {
|
||||
fillColor: panel.color
|
||||
strokeColor: "transparent"
|
||||
strokeWidth: 0
|
||||
PathSvg {
|
||||
path: earShape.modelData === 0 ? `M 0 0 L ${earShape.e} 0 L ${earShape.e} ${earShape.e} A ${earShape.e} ${earShape.e} 0 0 0 0 0 Z` : `M 0 0 L ${earShape.e} 0 A ${earShape.e} ${earShape.e} 0 0 0 0 ${earShape.e} Z`
|
||||
}
|
||||
}
|
||||
ShapePath {
|
||||
fillColor: "transparent"
|
||||
strokeColor: panel.border.color
|
||||
strokeWidth: 1
|
||||
PathSvg {
|
||||
path: earShape.modelData === 0 ? `M 0 0.5 A ${earShape.e} ${earShape.e} 0 0 1 ${earShape.e - 0.5} ${earShape.e}` : `M 0.5 ${earShape.e} A ${earShape.e} ${earShape.e} 0 0 1 ${earShape.e} 0.5`
|
||||
}
|
||||
}
|
||||
}
|
||||
// Notch mode: the notch's own shape (ears at the top edge) behind the
|
||||
// panel, which then draws no glass of its own.
|
||||
DrawerShape {
|
||||
visible: root.notch
|
||||
x: panel.x - BarDrawers.ear
|
||||
y: 0
|
||||
opacity: panel.opacity
|
||||
bodyWidth: panel.width
|
||||
bodyHeight: panel.height
|
||||
ear: BarDrawers.ear
|
||||
radius: panel.radius
|
||||
}
|
||||
GlassPanel {
|
||||
id: panel
|
||||
objectName: "launcherSurface"
|
||||
x: Math.round((root.width - width) / 2)
|
||||
y: root.notch ? -root.notchInset : Math.round(root.height * 0.22)
|
||||
y: root.notch ? 0 : Math.round(root.height * 0.22)
|
||||
// Notch mode grows out of the collapsed notch and shrinks back into it.
|
||||
width: ShellState.launcherOpen ? root.targetWidth : root.notch ? ShellState.notchPillWidth : Math.min(320, root.targetWidth)
|
||||
height: root.barHeight + root.bodyHeight + root.notchInset
|
||||
height: root.notch && !ShellState.launcherOpen ? BarDrawers.bottom : root.barHeight + root.bodyHeight
|
||||
color: root.notch ? Theme.transparent : Qt.alpha(Theme.surface, surfaceOpacity)
|
||||
border.width: root.notch ? 0 : 1
|
||||
plain: root.notch
|
||||
radius: Math.min(Theme.radius + 6, root.barHeight / 2)
|
||||
opacity: ShellState.launcherOpen ? 1 : 0
|
||||
scale: ShellState.launcherOpen || root.notch ? 1 : 1 - 0.04 * Theme.intensity
|
||||
@@ -337,10 +325,10 @@ PanelWindow {
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.top: parent.top
|
||||
anchors.topMargin: root.notchInset
|
||||
height: root.barHeight
|
||||
anchors.leftMargin: 12
|
||||
anchors.rightMargin: 18
|
||||
// Room for the mode pills inside the bar in notch mode.
|
||||
anchors.rightMargin: root.notch ? 18 + 2 * root.notchPill + 6 + 8 : 18
|
||||
spacing: 10
|
||||
Rectangle {
|
||||
objectName: "launcherBrowse"
|
||||
@@ -438,7 +426,7 @@ PanelWindow {
|
||||
anchors.right: parent.right
|
||||
anchors.top: bar.bottom
|
||||
anchors.bottom: parent.bottom
|
||||
visible: root.bodyHeight > 0 || panel.height > root.barHeight + root.notchInset + 1
|
||||
visible: root.bodyHeight > 0 || panel.height > root.barHeight + 1
|
||||
Rectangle {
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
|
||||
Reference in new issue
Block a user