diff --git a/quickshell/bar/Bar.qml b/quickshell/bar/Bar.qml index 5af60a5..43482fd 100644 --- a/quickshell/bar/Bar.qml +++ b/quickshell/bar/Bar.qml @@ -112,6 +112,6 @@ PanelWindow { width: implicitWidth height: implicitHeight // The open notch window draws over this spot on its own screen. - visible: root.notch && !(ShellState.notchWindow && ShellState.notchWindow.visible && ShellState.notchWindow.screen === root.screen) && !(ShellState.launcherWindow && ShellState.launcherWindow.visible && ShellState.launcherWindow.screen === root.screen) && !(ShellState.wallpaperWindow && ShellState.wallpaperWindow.visible && ShellState.wallpaperWindow.screen === root.screen) + visible: root.notch && !(ShellState.notchWindow && ShellState.notchWindow.visible && ShellState.notchWindow.screen === root.screen) && !(ShellState.launcherWindow && ShellState.launcherWindow.covering && ShellState.launcherWindow.screen === root.screen) && !(ShellState.wallpaperWindow && ShellState.wallpaperWindow.visible && ShellState.wallpaperWindow.screen === root.screen) } } diff --git a/quickshell/launcher/Launcher.qml b/quickshell/launcher/Launcher.qml index 2ddea83..81e1b2d 100644 --- a/quickshell/launcher/Launcher.qml +++ b/quickshell/launcher/Launcher.qml @@ -73,7 +73,10 @@ 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 - (notch ? 0 : 2 * pillsWidth)) + readonly property real targetWidth: Math.min(options.width + lead, root.width - 40 - (notch ? 0 : 2 * pillsWidth)) + // Notch mode keeps the collapsed notch's time and media at the left end of + // the search bar, as a notification does; the search opens to its right. + readonly property real lead: notch ? ShellState.notchPillWidth : 0 // A hovered mode pill names itself in the empty search bar. property string pillHover: "" readonly property int barHeight: 60 @@ -122,6 +125,17 @@ PanelWindow { readonly property real bodyHeight: emojiMode ? Math.min(maxBodyHeight, Math.max(84, Math.min(emojiGrid.contentHeight, emojiRows) + 42)) : showList ? Math.min(maxBodyHeight, Math.max(84, (clipboardMode ? Math.min(list.contentHeight, clipboardRows) : list.contentHeight) + 46 + (launchError ? 22 : 0))) : showGrid ? Math.min(maxBodyHeight, grid.contentHeight + 46) : 0 // Mode switches resize without animating, so >clipboard lands in place. property bool snapping: false + // Frames drawn since the window was mapped. The bar's notch pill stays up + // until the launcher has drawn over it, so opening never shows a gap, and + // comes back just before the launcher shrinks home and unmaps. + property int drawnFrames: 0 + onVisibleChanged: if (!visible) + drawnFrames = 0 + FrameAnimation { + running: root.notch && root.visible && root.drawnFrames < 3 + onTriggered: root.drawnFrames++ + } + readonly property bool covering: visible && drawnFrames >= 3 && (ShellState.launcherOpen || progress > 0.02) Timer { id: unsnap interval: 120 @@ -322,10 +336,18 @@ 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) + visible: root.notch + x: Math.round(panel.x + (root.lead - width) / 2) y: Math.round((BarDrawers.bottom - height) / 2) - opacity: Math.max(0, 1 - root.progress / 0.3) + } + Rectangle { + visible: root.notch + x: Math.round(panel.x + root.lead) + y: Math.round(BarDrawers.bottom * 0.25) + width: 1 + height: Math.round(BarDrawers.bottom * 0.5) + color: Theme.hairline + opacity: root.contentOpacity } GlassPanel { id: panel @@ -380,7 +402,7 @@ PanelWindow { anchors.right: parent.right anchors.top: parent.top height: root.barHeight - anchors.leftMargin: 12 + anchors.leftMargin: root.lead + 12 // Room for the mode pills inside the bar in notch mode. anchors.rightMargin: root.notch ? 18 + 2 * root.notchPill + 6 + 8 : 18 spacing: 10