Files
qbz/crates/qbz-slint/ui/settings/SettingRow.slint
T
vicrodh 4e329b4c8b chore(slint): flag unwired Appearance settings for the Tauri to Slint audit
Add a SettingRow 'unsupported' flag that renders the label red. Mark the Title Bar and Window Controls sections: that Tauri custom-window-decoration paradigm does not carry over to Slint's TitleBar/Plasma chrome.

cc
2026-05-26 15:09:29 -06:00

43 lines
1.3 KiB
Plaintext

// One settings row — a label and optional description on the left, the
// control (toggle or select, passed as a child) on the right.
import { Theme } from "../foundation/semantic-colors.slint";
import { Typography } from "../foundation/typography.slint";
export component SettingRow inherits HorizontalLayout {
in property <string> label;
in property <string> description;
in property <bool> enabled: true;
// Audit marker: when true, the label renders red to flag a setting
// that is NOT wired and will NOT survive the Tauri -> Slint migration
// (a dead-end placeholder, not pending work). Default false.
in property <bool> unsupported: false;
height: root.description == "" ? 52px : 64px;
spacing: 24px;
VerticalLayout {
alignment: center;
horizontal-stretch: 1;
spacing: 3px;
opacity: root.enabled ? 1.0 : 0.45;
Text {
text: root.label;
color: root.unsupported ? #ef4444 : Theme.text-primary;
font-size: Typography.body;
font-weight: Typography.medium;
}
if root.description != "": Text {
text: root.description;
color: Theme.text-muted;
font-size: 12px;
wrap: word-wrap;
}
}
VerticalLayout {
alignment: center;
@children
}
}