feat(kiosk): forward nav, window chrome, NPB gating, list windowing

- Add the forward nav button beside back (NavState.can-forward/request-forward).
- The kiosk back bar owns the window chrome (no HeaderBar): macOS leaves the
  ~78px traffic-light inset, Linux frameless draws the custom WindowControls
  on the right. OS-agnostic (the kiosk is not restricted to any platform).
- Hide ALL NPB view modes not compatible with kiosk (New/Classic/Small/Large
  + Miniplayer + Immersive) while in the kiosk profile; only the profile
  toggle remains.
- Track lists (Library/Search) use ListView so only the visible band mounts
  — the plain VerticalLayout spiked CPU on entry, which a Pi cannot afford.

cc
This commit is contained in:
vicrodh committed 2026-07-11 08:16:24 -06:00
1 parent 6032791be4
commit 9041b0e749
4 files changed
+56 -33

No files matched your search

+9 -11
View File
@@ -5,6 +5,7 @@
// FavoritesActions.select-tab (Rust lazy-loads each tab). Covers are push-only
// except album covers (windowed — v1 shows the first ~60; the window hook is a
// follow-up).
import { ListView } from "std-widgets.slint";
import { Theme } from "../foundation/semantic-colors.slint";
import { Radius } from "../foundation/radius.slint";
import { FavoritesState, FavoritesActions } from "../state.slint";
@@ -77,17 +78,14 @@ export component KioskLibrary inherits Rectangle {
vertical-stretch: 1;
clip: true;
if FavoritesState.active-tab == "tracks": Flickable {
viewport-width: self.width;
viewport-height: tracklist.preferred-height;
tracklist := VerticalLayout {
padding: root.pad;
spacing: 2px;
for track in FavoritesState.tracks-visible: KioskTrackRow {
track: track;
play(id) => {
FavoritesActions.play-track(id);
}
// ListView windows the rows (only the visible band is mounted) — a
// plain VerticalLayout of every track spiked CPU on entry, which a Pi
// can't afford.
if FavoritesState.active-tab == "tracks": ListView {
for track in FavoritesState.tracks-visible: KioskTrackRow {
track: track;
play(id) => {
FavoritesActions.play-track(id);
}
}
}