Open the launcher inside the notch in notch mode
The launcher now works like a notification there: the notch pill widens at its own height, the clock and now playing keep the left end, and a search field with the top matches as a row of icons fills the right. Enter launches the highlighted match, Tab and arrows move along the row, Escape clears then closes, and a click elsewhere closes it. The bar window takes the keyboard while it is open. Clipboard history and emoji still open the launcher window, which now only shows for those modes. NotchGlance moves to components so the launcher and notch can share it without importing each other. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
bb429cb9d9
commit
5e56abd877
7 files changed
+321
-32
No files matched your search
@@ -1,63 +0,0 @@
|
||||
pragma ComponentBehavior: Bound
|
||||
import QtQuick
|
||||
import Quickshell
|
||||
import Quickshell.Widgets
|
||||
import "../services"
|
||||
import "../theme"
|
||||
|
||||
// What the collapsed notch shows: the time, plus cover art and a small
|
||||
// visualizer while audio plays. Shared by the pill and by the launcher, which
|
||||
// fades it out as it grows out of the notch.
|
||||
Row {
|
||||
id: root
|
||||
property bool playing: MediaService.playing
|
||||
spacing: 10
|
||||
ClippingRectangle {
|
||||
visible: root.playing
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
width: 22
|
||||
height: 22
|
||||
radius: 6
|
||||
color: Theme.fill
|
||||
Image {
|
||||
anchors.fill: parent
|
||||
source: MediaService.artwork
|
||||
sourceSize: Qt.size(44, 44)
|
||||
fillMode: Image.PreserveAspectCrop
|
||||
asynchronous: true
|
||||
}
|
||||
}
|
||||
Text {
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
text: Qt.formatDateTime(clock.date, ConfigService.ready && !ConfigService.data.bar.clock.use24Hour ? "h:mm" : "HH:mm")
|
||||
color: Theme.text
|
||||
font.pixelSize: 14
|
||||
font.weight: Font.DemiBold
|
||||
font.features: {
|
||||
"tnum": 1
|
||||
}
|
||||
}
|
||||
Row {
|
||||
visible: root.playing
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
height: 16
|
||||
spacing: 2
|
||||
Repeater {
|
||||
model: 8
|
||||
Rectangle {
|
||||
required property int index
|
||||
// Every third Cava band, so the eight span the spectrum.
|
||||
readonly property real level: CavaService.bars[index * 3] || 0
|
||||
width: 3
|
||||
height: Math.max(3, 16 * level)
|
||||
y: 16 - height
|
||||
radius: 1.5
|
||||
color: Theme.accent
|
||||
}
|
||||
}
|
||||
}
|
||||
SystemClock {
|
||||
id: clock
|
||||
precision: SystemClock.Minutes
|
||||
}
|
||||
}
|
||||
@@ -2,13 +2,15 @@ pragma ComponentBehavior: Bound
|
||||
import QtQuick
|
||||
import "../components"
|
||||
import "../core"
|
||||
import "../launcher"
|
||||
import "../services"
|
||||
import "../theme"
|
||||
|
||||
// The collapsed notch: a glass island hanging from the screen's top edge with
|
||||
// concave ears, showing the time, plus cover art and a small visualizer while
|
||||
// audio plays. Clicking it opens the notch panel. A new notification widens
|
||||
// it: the clock and media keep the left end, the banner takes the right.
|
||||
// it: the clock and media keep the left end, the banner takes the right. The
|
||||
// launcher opens the same way, with the search where the banner would be.
|
||||
Item {
|
||||
id: root
|
||||
property var barScreen
|
||||
@@ -24,11 +26,13 @@ Item {
|
||||
if (latest)
|
||||
notice = latest;
|
||||
}
|
||||
readonly property bool showing: !!latest && owner && visible
|
||||
readonly property bool searching: ShellState.notchSearch && ScreenService.current(ShellState.launcherScreen) === barScreen && visible
|
||||
readonly property bool showing: !!latest && owner && visible && !searching
|
||||
// Holds the last banner while the notch closes around it.
|
||||
property var notice: null
|
||||
readonly property int noticeWidth: 340
|
||||
readonly property real bodyWidth: ShellState.notchPillWidth + (showing ? noticeWidth : 0)
|
||||
readonly property int searchWidth: 520
|
||||
readonly property real bodyWidth: ShellState.notchPillWidth + (searching ? searchWidth : showing ? noticeWidth : 0)
|
||||
implicitWidth: bodyWidth + 2 * BarDrawers.ear
|
||||
implicitHeight: BarDrawers.bottom
|
||||
Behavior on implicitWidth {
|
||||
@@ -203,6 +207,34 @@ Item {
|
||||
}
|
||||
}
|
||||
}
|
||||
Item {
|
||||
objectName: "notchSearch"
|
||||
x: lead.x + lead.width
|
||||
width: Math.max(0, root.width - BarDrawers.ear - x)
|
||||
height: root.height
|
||||
clip: true
|
||||
opacity: root.searching ? 1 : 0
|
||||
visible: width > 1 && opacity > 0
|
||||
Behavior on opacity {
|
||||
NumberAnimation {
|
||||
duration: root.searching ? Theme.notchDuration * 1.6 : Theme.notchDuration * 0.6
|
||||
easing.type: Easing.OutCubic
|
||||
}
|
||||
}
|
||||
Rectangle {
|
||||
anchors.left: parent.left
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
width: 1
|
||||
height: parent.height * 0.5
|
||||
color: Theme.hairline
|
||||
}
|
||||
// Laid out at full width so it does not reflow while the notch grows.
|
||||
NotchSearch {
|
||||
width: root.searchWidth
|
||||
height: parent.height
|
||||
active: root.searching
|
||||
}
|
||||
}
|
||||
// 0 (critical) stays until dismissed. Each banner's time counts from its
|
||||
// arrival, so older ones revealed by an expiry leave on schedule; hovering
|
||||
// restarts the full time.
|
||||
|
||||
Reference in new issue
Block a user