feat(slint): HiFi wizard polish — scrollbar, progress checkboxes, FLACDalf, trigger move

From owner feedback:
- The body Flickable now has a visible ListScrollbar (wrapped in a Rectangle so
  it can overlay) — the review step with multiple DAC accordions can be tall.
- Configure step gains Tauri-style progress checkboxes (backup / config files /
  restart) so the user can track what they ran; Next is gated on all three.
- The trigger moves to the end of the BIT-PERFECT group (the wizard's whole
  point is bit-perfect) and now wears the FLACDalf (gandalf) icon, which also
  replaces the modal header icon. gandalf.svg copied into the Slint icon assets.

cc
This commit is contained in:
vicrodh committed 2026-06-16 12:20:53 -06:00
1 parent 3db43b4481
commit 1e5e4d3ce5
4 files changed
+262 -35

No files matched your search

@@ -0,0 +1,162 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg xmlns="http://www.w3.org/2000/svg" version="1.2" baseProfile="tiny" viewBox="0.00 0.00 100.00 100.00" width="100.00" height="100.00">
<g>
<path fill="#000000" d="
M 44.00 5.56
Q 44.18 5.56 44.24 5.52
C 48.35 3.31 54.84 4.30 59.34 6.39
Q 73.67 13.03 75.28 28.51
Q 77.00 45.04 81.97 93.69
A 1.92 1.92 0.0 0 1 80.24 95.80
L 80.13 95.81
A 1.95 1.95 0.0 0 1 78.01 94.07
Q 74.00 55.61 71.84 33.50
Q 70.90 23.96 68.99 20.35
C 64.91 12.62 56.73 7.78 47.81 8.34
A 2.80 2.79 -61.0 0 0 46.66 8.67
C 45.87 9.10 44.88 9.96 44.00 9.96
C 43.12 9.96 42.13 9.10 41.34 8.67
A 2.80 2.79 61.0 0 0 40.19 8.34
C 31.27 7.78 23.09 12.62 19.01 20.35
Q 17.10 23.96 16.16 33.50
Q 14.00 55.61 9.98 94.07
A 1.95 1.95 0.0 0 1 7.86 95.81
L 7.75 95.80
A 1.92 1.92 0.0 0 1 6.02 93.69
Q 11.00 45.04 12.72 28.51
Q 14.33 13.03 28.66 6.39
C 33.16 4.30 39.65 3.31 43.76 5.52
Q 43.82 5.56 44.00 5.56
Z"
/>
<path fill="#000000" d="
M 88.00 4.33
Q 88.20 4.33 88.27 4.44
Q 97.14 18.60 97.64 19.43
A 1.75 1.67 31.1 0 1 97.89 20.35
Q 97.86 27.45 95.17 40.45
Q 93.80 47.13 90.33 51.14
A 1.37 1.34 65.9 0 0 90.00 52.03
L 90.00 95.35
A 0.65 0.65 0.0 0 1 89.35 96.00
Q 89.05 96.00 88.00 96.00
Q 86.95 96.00 86.65 96.00
A 0.65 0.65 0.0 0 1 86.00 95.35
L 86.00 52.03
A 1.37 1.34 -65.9 0 0 85.67 51.14
Q 82.19 47.13 80.82 40.45
Q 78.13 27.45 78.10 20.35
A 1.75 1.67 -31.1 0 1 78.35 19.43
Q 78.85 18.60 87.72 4.44
Q 87.79 4.33 88.00 4.33
Z
M 87.99 16.37
Q 88.16 16.37 88.95 13.91
A 1.31 1.31 0.0 0 0 88.90 12.99
Q 88.43 11.92 88.00 11.92
Q 87.58 11.92 87.10 12.98
A 1.31 1.31 0.0 0 0 87.05 13.91
Q 87.82 16.37 87.99 16.37
Z
M 83.74 18.25
L 82.28 20.78
A 1.66 1.66 0.0 0 0 82.07 21.79
L 83.34 33.00
A 0.20 0.20 0.0 0 0 83.71 33.07
Q 87.68 25.64 84.59 18.31
A 0.48 0.47 48.8 0 0 83.74 18.25
Z
M 92.26 18.20
A 0.48 0.48 0.0 0 0 91.40 18.26
Q 88.31 25.62 92.30 33.08
A 0.20 0.20 0.0 0 0 92.67 33.01
L 93.94 21.75
A 1.67 1.66 -56.9 0 0 93.73 20.74
L 92.26 18.20
Z
M 88.00 47.62
Q 88.34 47.62 89.14 46.13
Q 89.90 44.71 91.10 40.33
A 1.08 1.06 -51.2 0 0 91.03 39.62
L 88.14 33.79
A 0.09 0.08 79.5 0 0 88.07 33.73
Q 88.03 33.73 88.00 33.73
Q 87.97 33.73 87.94 33.73
A 0.09 0.08 -79.5 0 0 87.87 33.79
L 84.97 39.62
A 1.08 1.06 51.3 0 0 84.90 40.33
Q 86.09 44.71 86.85 46.13
Q 87.65 47.62 88.00 47.62
Z"
/>
<path fill="#000000" d="
M 44.00 24.65
Q 44.18 24.65 44.65 24.16
C 52.89 15.80 65.71 21.08 65.96 32.76
Q 66.04 36.51 65.99 92.81
A 2.01 2.01 0.0 0 1 64.05 94.82
L 63.97 94.82
A 1.91 1.90 -0.9 0 1 62.00 92.92
L 62.00 65.35
A 1.24 1.20 -67.8 0 0 61.66 64.50
Q 57.89 60.53 53.58 58.45
A 0.75 0.75 0.0 0 0 52.70 58.61
C 50.31 61.10 47.59 61.96 44.00 61.96
C 40.41 61.96 37.69 61.10 35.30 58.61
A 0.75 0.75 0.0 0 0 34.42 58.45
Q 30.11 60.53 26.34 64.50
A 1.24 1.20 67.8 0 0 26.00 65.35
L 26.00 92.92
A 1.91 1.90 0.9 0 1 24.03 94.82
L 23.95 94.82
A 2.01 2.01 0.0 0 1 22.01 92.81
Q 21.96 36.51 22.04 32.76
C 22.28 21.08 35.10 15.80 43.34 24.16
Q 43.82 24.65 44.00 24.65
Z
M 44.00 57.96
C 46.12 57.96 49.49 57.46 50.07 55.04
Q 50.40 53.66 51.73 53.46
A 1.97 1.91 -38.5 0 1 52.66 53.55
Q 57.64 55.37 61.44 58.95
A 0.32 0.32 0.0 0 0 61.98 58.71
Q 62.04 40.89 61.97 32.78
C 61.91 25.07 54.00 21.48 47.99 26.16
C 46.66 27.20 45.76 29.97 43.99 29.97
C 42.23 29.97 41.33 27.20 39.99 26.16
C 33.98 21.49 26.07 25.08 26.02 32.79
Q 25.95 40.90 26.02 58.72
A 0.32 0.32 0.0 0 0 26.56 58.96
Q 30.36 55.38 35.34 53.56
A 1.97 1.91 38.5 0 1 36.27 53.46
Q 37.60 53.66 37.93 55.04
C 38.51 57.46 41.89 57.96 44.00 57.96
Z"
/>
<rect fill="#000000" x="37.07" y="68.01" width="13.86" height="3.98" rx="1.92"/>
</g>
<g>
<path fill="#000000" d="
M 35.01 33.16
C 36.76 33.18 40.51 34.06 39.85 36.58
A 1.92 1.90 21.6 0 1 37.08 37.76
Q 35.98 37.17 34.97 37.16
Q 33.95 37.14 32.84 37.72
A 1.92 1.90 -20.3 0 1 30.09 36.48
C 29.49 33.94 33.26 33.14 35.01 33.16
Z"
/>
<path fill="#000000" d="
M 53.03 37.15
Q 52.02 37.17 50.91 37.76
A 1.92 1.90 -21.6 0 1 48.15 36.58
C 47.49 34.06 51.24 33.17 52.99 33.15
C 54.74 33.13 58.52 33.94 57.91 36.48
A 1.92 1.90 20.4 0 1 55.16 37.72
Q 54.05 37.14 53.03 37.15
Z"
/>
<circle fill="#000000" cx="34.75" cy="42.20" r="2.27"/>
<circle fill="#000000" cx="54.00" cy="42.00" r="1.96"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 4.4 KiB

@@ -20,6 +20,7 @@ import { QbzSelect } from "QbzSelect.slint";
import { CommandBlock } from "CommandBlock.slint";
import { WarningBanner } from "WarningBanner.slint";
import { SelectionCheckbox } from "SelectionCheckbox.slint";
import { ListScrollbar } from "ListScrollbar.slint";
export component DacWizardModal inherits Rectangle {
visible: DacWizardState.open;
@@ -84,9 +85,9 @@ export component DacWizardModal inherits Rectangle {
VerticalLayout {
alignment: center;
QbzIcon {
source: @image-url("../assets/icons/circle-check-big.svg");
width: 24px;
height: 24px;
source: @image-url("../assets/icons/gandalf.svg");
width: 26px;
height: 26px;
tint: #3fae6a;
}
}
@@ -150,9 +151,11 @@ export component DacWizardModal inherits Rectangle {
}
Rectangle { height: 1px; background: Theme.border-subtle; }
// Body — scrolls when a step outgrows the card.
Flickable {
// Body — scrolls when a step outgrows the card, with a visible
// scrollbar. Wrapped in a Rectangle so the scrollbar can overlay.
Rectangle {
vertical-stretch: 1;
body-flick := Flickable {
viewport-width: self.width;
viewport-height: body.preferred-height;
@@ -460,6 +463,17 @@ export component DacWizardModal inherits Rectangle {
DacWizardActions.copy-command(DacWizardState.backup-cmd);
}
}
HorizontalLayout {
spacing: 10px;
alignment: start;
QbzCheckbox { checked <=> DacWizardState.review-backup-done; }
Text {
text: @tr("I created a backup");
color: Theme.text-secondary;
font-size: Typography.legal;
vertical-alignment: center;
}
}
// 2. Per-DAC config — collapsible accordions.
for cfg[i] in DacWizardState.dac-configs: VerticalLayout {
spacing: 8px;
@@ -524,6 +538,17 @@ export component DacWizardModal inherits Rectangle {
}
}
}
HorizontalLayout {
spacing: 10px;
alignment: start;
QbzCheckbox { checked <=> DacWizardState.review-config-done; }
Text {
text: @tr("I created the configuration files");
color: Theme.text-secondary;
font-size: Typography.legal;
vertical-alignment: center;
}
}
// 3. Restart (init-aware).
CommandBlock {
caption: @tr("3. Restart the audio services to load the config");
@@ -532,6 +557,17 @@ export component DacWizardModal inherits Rectangle {
DacWizardActions.copy-command(DacWizardState.restart-cmd);
}
}
HorizontalLayout {
spacing: 10px;
alignment: start;
QbzCheckbox { checked <=> DacWizardState.review-restart-done; }
Text {
text: @tr("I restarted the audio services");
color: Theme.text-secondary;
font-size: Typography.legal;
vertical-alignment: center;
}
}
}
// ── Step 4: self-service playback test ───────────
if DacWizardState.step == 4: VerticalLayout {
@@ -704,6 +740,15 @@ export component DacWizardModal inherits Rectangle {
}
}
}
}
ListScrollbar {
x: parent.width - self.width - 2px;
width: 12px;
height: 100%;
viewport-height: body-flick.viewport-height;
visible-height: body-flick.height;
viewport-y <=> body-flick.viewport-y;
}
}
Rectangle { height: 1px; background: Theme.border-subtle; }
@@ -738,7 +783,11 @@ export component DacWizardModal inherits Rectangle {
? DacWizardState.welcome-confirmed
: (DacWizardState.step == 2
? (DacWizardState.any-dac-selected || DacWizardState.manual-valid)
: true);
: (DacWizardState.step == 3
? (DacWizardState.review-backup-done
&& DacWizardState.review-config-done
&& DacWizardState.review-restart-done)
: true));
clicked => {
if (DacWizardState.step == 5) {
DacWizardState.open = false;
@@ -237,6 +237,47 @@ export component AudioSettings inherits VerticalLayout {
}
}
// HiFi Wizard — guided bit-perfect DAC setup (PipeWire only). Lives at the
// end of BIT-PERFECT: the whole point of the wizard is bit-perfect.
if SettingsState.backend-is-pipewire: SettingRow {
label: @tr("HiFi Wizard");
description: @tr("Auto-detect your DACs and set up bit-perfect playback, step by step.");
wizard-btn := Rectangle {
width: 160px;
height: 34px;
border-radius: Radius.sm;
border-width: 1px;
border-color: Theme.border-subtle;
background: wizard-ta.has-hover ? Theme.surface-hover : Theme.surface-elevated;
HorizontalLayout {
alignment: center;
spacing: 8px;
VerticalLayout {
alignment: center;
QbzIcon {
width: 18px;
height: 18px;
source: @image-url("../assets/icons/gandalf.svg");
tint: Theme.text-primary;
}
}
Text {
text: @tr("Open Wizard");
color: Theme.text-primary;
font-size: Typography.body;
font-weight: Typography.medium;
vertical-alignment: center;
}
}
wizard-ta := TouchArea {
mouse-cursor: pointer;
clicked => {
DacWizardActions.open();
}
}
}
}
Rectangle { height: 12px; }
Divider { }
Rectangle { height: 12px; }
@@ -269,35 +310,6 @@ export component AudioSettings inherits VerticalLayout {
}
}
// HiFi Wizard — guided DAC setup (PipeWire only, mirrors the Tauri gate).
if SettingsState.backend-is-pipewire: GroupHeader { text: @tr("DAC SETUP"); }
if SettingsState.backend-is-pipewire: SettingRow {
label: @tr("HiFi Wizard");
description: @tr("Auto-detect your DACs and set up bit-perfect playback, step by step.");
wizard-btn := Rectangle {
width: 160px;
height: 34px;
border-radius: Radius.sm;
border-width: 1px;
border-color: Theme.border-subtle;
background: wizard-ta.has-hover ? Theme.surface-hover : Theme.surface-elevated;
Text {
text: @tr("Open Wizard");
color: Theme.text-primary;
font-size: Typography.body;
font-weight: Typography.medium;
horizontal-alignment: center;
vertical-alignment: center;
}
wizard-ta := TouchArea {
mouse-cursor: pointer;
clicked => {
DacWizardActions.open();
}
}
}
}
Rectangle { height: 20px; }
// Reset — restores Audio + Playback defaults.
+4
View File
@@ -3928,6 +3928,10 @@ export global DacWizardState {
in-out property <string> backup-cmd: "";
in-out property <string> restart-cmd: "";
in-out property <[string]> created-paths: []; // done step
// Progress checkboxes (Tauri parity) — help the user track what they ran.
in-out property <bool> review-backup-done: false;
in-out property <bool> review-config-done: false;
in-out property <bool> review-restart-done: false;
}
export global DacWizardActions {