feat(kiosk): shell — mount immersive overlay, hide transport on Now Playing, fixed footer, drop Search tile

The immersive overlay hangs inside AppShell, so the kiosk shell mounts its own copy. The transport bar is hidden on Now Playing (redundant there) and the content height no longer subtracts it then, so the NavRail stays pinned. Footer Search tile removed — the back-bar carries a persistent search field.

cc
This commit is contained in:
vicrodh committed 2026-07-12 12:43:56 -06:00
1 parent 67d81ea415
commit 26f9e3e1a2
2 files changed
+29 -24

No files matched your search

+23 -7
View File
@@ -19,7 +19,8 @@ import { LineEdit } from "std-widgets.slint";
import { Theme } from "../foundation/semantic-colors.slint";
import { Layout } from "../foundation/layout.slint";
import { Radius } from "../foundation/radius.slint";
import { NavState, ContentView, OfflineState, PlaylistState, PurchaseDetailState, SearchActions, UiFocusState, AppearanceState } from "../state.slint";
import { NavState, ContentView, OfflineState, PlaylistState, PurchaseDetailState, SearchActions, UiFocusState, AppearanceState, ImmersiveState } from "../state.slint";
import { ImmersiveView } from "../immersive/ImmersiveView.slint";
import { PlayerBarSmall } from "PlayerBarSmall.slint";
import { NavRail } from "NavRail.slint";
import { WindowControls } from "WindowControls.slint";
@@ -197,8 +198,12 @@ export component KioskShell inherits Rectangle {
Rectangle {
// window - back bar - transport(PlayerBarSmall = one header
// row) - NavRail - this VL's bottom padding.
height: root.height - Layout.header-height - Layout.header-height
// row) - NavRail - this VL's bottom padding. The transport
// row is HIDDEN on Now Playing (redundant there), so DON'T
// subtract it then — otherwise the content stays short and the
// NavRail rides up, leaving dead space below the footer.
height: root.height - Layout.header-height
- (NavState.view == ContentView.now-playing ? 0px : Layout.header-height)
- root.navrail-height - 8px;
vertical-stretch: 1;
background: Theme.surface-main;
@@ -459,7 +464,9 @@ export component KioskShell inherits Rectangle {
// --- Persistent transport: force PlayerBarSmall (npb=2 seam). Reused
// verbatim; it self-heights to one header row and reads its own globals.
PlayerBarSmall {
// Hidden on the Now Playing view — that view already carries the full
// transport, so the bar would be redundant there.
if NavState.view != ContentView.now-playing: PlayerBarSmall {
height: Layout.header-height;
open-album(id) => {
root.open-album(id);
@@ -491,9 +498,6 @@ export component KioskShell inherits Rectangle {
myqbz => {
root.header-menu-navigate("myqbz-mixtapes");
}
search => {
NavState.view = ContentView.search;
}
playing => {
NavState.view = ContentView.now-playing;
}
@@ -505,4 +509,16 @@ export component KioskShell inherits Rectangle {
}
}
}
// Immersive / visualizer overlay — the same app-level view the desktop
// mounts, but the desktop hangs it inside AppShell, so the kiosk shell must
// mount its own copy. Reached from the NavRail visualizer tile (which fires
// the "npb-view"/"immersive" action). Rendered last = on top of everything.
if ImmersiveState.open: ImmersiveView {
width: 100%;
height: 100%;
media-action(kind, id, action) => {
root.media-action(kind, id, action);
}
}
}
+6 -17
View File
@@ -59,15 +59,16 @@ export component NavRail inherits Rectangle {
callback library();
callback local-library();
callback myqbz();
callback search();
callback playing();
callback visualizer();
callback menu();
background: Theme.surface-main;
// 8 tiles, 8px outer padding, 6px gaps (7 gaps).
property <length> tw: (root.width - 16px - 7 * 6px) / 8;
// 7 tiles, 8px outer padding, 6px gaps (6 gaps). Search is intentionally
// absent — the back-bar carries a persistent search field, so a footer
// Search tile is redundant.
property <length> tw: (root.width - 16px - 6 * 6px) / 7;
property <length> th: root.height - 18px;
Rectangle {
@@ -133,18 +134,6 @@ export component NavRail inherits Rectangle {
y: 9px;
width: root.tw;
height: root.th;
icon: @image-url("../assets/icons/search.svg");
label: @tr("Search");
active: NavState.view == ContentView.search;
clicked => {
root.search();
}
}
NavTile {
x: 8px + 5 * (root.tw + 6px);
y: 9px;
width: root.tw;
height: root.th;
icon: @image-url("../assets/icons/play-fill.svg");
label: @tr("Now Playing");
active: NavState.view == ContentView.now-playing;
@@ -153,7 +142,7 @@ export component NavRail inherits Rectangle {
}
}
NavTile {
x: 8px + 6 * (root.tw + 6px);
x: 8px + 5 * (root.tw + 6px);
y: 9px;
width: root.tw;
height: root.th;
@@ -165,7 +154,7 @@ export component NavRail inherits Rectangle {
}
}
NavTile {
x: 8px + 7 * (root.tw + 6px);
x: 8px + 6 * (root.tw + 6px);
y: 9px;
width: root.tw;
height: root.th;