Grow the launcher out of the notch like the notch panel

In notch mode the launcher now morphs from the collapsed notch with the
notch's own curve and open/close speeds: the shape stays solid, width
leads the height, and the search fades in once it is mostly open. The
notch's time and media fade out as it grows and back in as it closes,
and the pill stays hidden until the launcher has shrunk home. The pill's
contents move to NotchGlance so both can draw them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
mxandClaude Opus 5.5 committed 2026-11-14 14:46:39 +01:00
1 parent f65c475455
commit 52a0e29959
5 files changed
+126 -66

No files matched your search

+59 -12
View File
@@ -8,6 +8,7 @@ import "../components"
import "../services"
import "../theme"
import "../core"
import "../notch"
// Spotlight-style launcher: opens as a single search bar in the upper third.
// Typing shows ranked results below it; the magnifying glass (or ↓ in an
@@ -28,7 +29,7 @@ PanelWindow {
left: true
right: true
}
visible: ShellState.launcherOpen || panel.opacity > 0.01
visible: ShellState.launcherOpen || panel.opacity > 0.01 || (notch && progress > 0.001)
color: Theme.transparent
exclusionMode: ExclusionMode.Ignore
WlrLayershell.namespace: "glassMxrph-launcher"
@@ -79,6 +80,36 @@ PanelWindow {
// 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
// Notch mode morphs the collapsed notch into the launcher, as the notch
// panel does: solid shape throughout, width leading the height a little,
// contents fading in once it is mostly open and out first.
property real progress: ShellState.launcherOpen ? 1 : 0
Behavior on progress {
enabled: root.notch
NumberAnimation {
id: morph
duration: ShellState.launcherOpen ? Theme.notchOpenDuration * 2 : Theme.notchCloseDuration * 1.3
easing.type: Easing.BezierSpline
easing.bezierCurve: ShellState.launcherOpen ? [0.2, 0, 0, 1, 1, 1] : [0.3, 0, 0.8, 0.15, 1, 1]
}
}
readonly property bool settled: ShellState.launcherOpen && !morph.running
readonly property real wp: Math.min(1, progress * 1.15)
readonly property real contentOpacity: Math.max(0, Math.min(1, (progress - 0.55) / 0.4))
// Open height, held while closing so clearing the results does not jump it.
property real heldHeight: barHeight + bodyHeight
Binding on heldHeight {
when: ShellState.launcherOpen
value: root.barHeight + root.bodyHeight
restoreMode: Binding.RestoreNone
}
Behavior on heldHeight {
enabled: root.notch && root.settled && !root.snapping
NumberAnimation {
duration: Theme.duration
easing.type: Easing.OutCubic
}
}
// 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))
@@ -146,8 +177,14 @@ PanelWindow {
selectedIndex = 0;
search.forceActiveFocus();
}
Component.onCompleted: LauncherState.window = root
Component.onDestruction: LauncherState.window = null
Component.onCompleted: {
LauncherState.window = root;
ShellState.launcherWindow = root;
}
Component.onDestruction: {
LauncherState.window = null;
ShellState.launcherWindow = null;
}
Connections {
target: ShellState
function onLauncherOpenChanged() {
@@ -270,7 +307,6 @@ PanelWindow {
visible: root.notch
x: panel.x - BarDrawers.ear
y: 0
opacity: panel.opacity
bodyWidth: panel.width
bodyHeight: panel.height
ear: BarDrawers.ear
@@ -283,42 +319,53 @@ PanelWindow {
}
}
}
// The collapsed notch's time and media, fading out as the launcher grows
// out of it and back in as it shrinks home.
NotchGlance {
visible: root.notch && opacity > 0
x: Math.round((root.width - width) / 2)
y: Math.round((BarDrawers.bottom - height) / 2)
opacity: Math.max(0, 1 - root.progress / 0.3)
}
GlassPanel {
id: panel
objectName: "launcherSurface"
x: Math.round((root.width - width) / 2)
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.notch && !ShellState.launcherOpen ? BarDrawers.bottom : root.barHeight + root.bodyHeight
width: root.notch ? ShellState.notchPillWidth + (root.targetWidth - ShellState.notchPillWidth) * root.wp : ShellState.launcherOpen ? root.targetWidth : Math.min(320, root.targetWidth)
height: root.notch ? BarDrawers.bottom + (root.heldHeight - BarDrawers.bottom) * root.progress : 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
opacity: root.notch ? root.contentOpacity : ShellState.launcherOpen ? 1 : 0
scale: ShellState.launcherOpen || root.notch ? 1 : 1 - 0.04 * Theme.intensity
clip: true
Behavior on width {
enabled: !root.notch
NumberAnimation {
duration: !root.notch ? Theme.duration : ShellState.launcherOpen ? Theme.notchOpenDuration : Theme.notchCloseDuration
duration: Theme.duration
easing.type: Easing.OutCubic
}
}
Behavior on height {
enabled: !root.snapping
enabled: !root.notch && !root.snapping
NumberAnimation {
duration: !root.notch ? Theme.duration : ShellState.launcherOpen ? Theme.notchOpenDuration : Theme.notchCloseDuration
duration: Theme.duration
easing.type: Easing.OutCubic
}
}
Behavior on opacity {
enabled: !root.notch
NumberAnimation {
duration: !root.notch ? Theme.duration : ShellState.launcherOpen ? Theme.notchOpenDuration : Theme.notchCloseDuration
duration: Theme.duration
}
}
Behavior on scale {
enabled: !root.notch
NumberAnimation {
duration: !root.notch ? Theme.duration : ShellState.launcherOpen ? Theme.notchOpenDuration : Theme.notchCloseDuration
duration: Theme.duration
easing.type: Easing.OutCubic
}
}