Files
qbz/crates/qbz-ui/ui/shell/KioskArtistCard.slint
T
vicrodh f1eeaf9126 feat(steam-deck): game mode support (plan PR1-PR5)
- PR1: gamescope detection at boot — X11 backend, scale 1, kiosk
  fullscreen; tray + miniplayer suppressed (click-offset fix).
- PR2: full keyboard navigation for the kiosk (3 zones, focus ring,
  scroll-into-view; typing never navigates).
- PR3: native gamepad via gilrs — D-pad/stick/A/B to synthetic Slint
  keys with hysteresis, repeat and debounce; B suppresses Escape while
  a text field is focused (closes the Steam OSK).
- PR4: Steam OSK via the steam://open/keyboard deeplink on text focus.
- PR5: scripts/qbz-add-to-steam (stdlib-only, 19/19 unit tests) with
  artwork assets + pure-gamepad controller layout.

Spec: qbz-nix-docs/steam-deck/STEAM_DECK_GAME_MODE_PLAN.md

km
2026-07-25 12:04:58 -06:00

56 lines
1.7 KiB
Plaintext

// KioskArtistCard — lightweight round artist card for the kiosk Search/Library
// artist tabs (2.0.2 frente #3). Takes primitive fields so it works for both
// SearchState.artists (SlimItem: id/title/artwork) and FavoritesState.artists
// (FavoriteArtistItem: id/name/image).
import { Theme } from "../foundation/semantic-colors.slint";
import { Radius } from "../foundation/radius.slint";
export component KioskArtistCard inherits Rectangle {
in property <string> id;
in property <string> name;
in property <image> avatar;
in property <length> size: 120px;
// Keyboard/gamepad nav (PR 2) — same ring idiom as KioskCard.
in property <bool> nav-focused: false;
callback clicked(string);
width: root.size;
border-width: root.nav-focused ? 3px : 0px;
border-color: Theme.accent;
border-radius: Radius.sm;
background: root.nav-focused ? Theme.accent.with-alpha(0.12) : transparent;
VerticalLayout {
alignment: start;
spacing: 8px;
Rectangle {
width: root.size;
height: root.size;
border-radius: root.size / 2;
background: Theme.surface-elevated;
clip: true;
Image {
width: 100%;
height: 100%;
source: root.avatar;
image-fit: cover;
}
}
Text {
text: root.name;
color: Theme.text-primary;
font-size: 13px;
font-weight: 600;
horizontal-alignment: center;
overflow: elide;
wrap: no-wrap;
}
}
ta := TouchArea {
clicked => {
root.clicked(root.id);
}
}
}