feat(qbz-qt): rebuild Settings 1:1 against Slint

The pane was written fast and had drifted both ways: four whole sections were
a placeholder reading "not ported to the Qt frontend yet", and what was there
carried rows and copy Slint does not have — an invented custom-theme info row,
made-up "Restart to apply" descriptions, dividers Integrations never had, and
two buttons forked inline instead of using the shared control.

Every section is real now, in Slint's order and grouping, with Slint's labels
and control types: Audio, Playback, Appearance, Offline, Local Library,
Blacklist, Integrations, Developer, and the sandbox section that only appears
on a Flatpak or Snap install. Local Library brings the folder table and the
Plex panel — 856 lines of Slint with no counterpart here until now — wired to
the Plex store that landed earlier this round. Its PIN auth flow is not ported,
so the manual server-url and token path is what this exposes.

The rule the round was run under: a row whose key is not in settings_qt's
dispatch renders and does nothing, so it is either wired or not shipped.
"Share logs" was exactly that — present since the port began, inert — and now
opens the on-disk log.

The directory is per-section files under a thin composition root rather than
one growing file, and the sub-nav's bottom spacer stops being arithmetic over a
hardcoded row count, which broke the moment anyone added a section.

cc
This commit is contained in:
vicrodh committed 2026-07-28 17:21:44 -06:00
1 parent 75ea846768
commit 83999fc552
19 files changed
+2655 -541

No files matched your search

@@ -0,0 +1,40 @@
// QbzCheckbox (primitives/QbzCheckbox.slint) — 18px square, r4, accent fill
// with a black check when on, 1.5px muted border when off. Emits toggled();
// like the Slint original it never self-flips (the owner of the state does).
//
// Used by Settings > Local Library (folder selection) and the Plex library
// picker, i.e. every place the Slint uses its own QbzCheckbox.
import QtQuick
import "../theme"
Rectangle {
id: root
property bool checked: false
signal toggled()
QbzTheme { id: theme }
width: 18
height: 18
radius: 4
color: root.checked ? theme.accent : "transparent"
border.width: root.checked ? 0 : 2
border.color: theme.textMuted
QbzIcon {
anchors.centerIn: parent
visible: root.checked
name: "check"
tintName: "black"
width: 12
height: 12
}
MouseArea {
anchors.fill: parent
cursorShape: Qt.PointingHandCursor
onClicked: root.toggled()
}
}
@@ -0,0 +1,73 @@
// WarningBanner (primitives/WarningBanner.slint) — a colored info / warning /
// error notice: 10%-alpha background, 30%-alpha border, a tone glyph, and a
// wrapping title + body (either may be empty).
//
// POC-NOTE (icon set): the Slint uses triangle-alert / circle-alert /
// circle-check-big glyphs; this port's icon set has none of them, so every
// variant uses `info` in the variant's tint. The color + the title still
// carry the tone.
import QtQuick
import "../theme"
Rectangle {
id: root
property string title: ""
property string body: ""
// "info" | "warning" | "error" | "success"
property string variant: "warning"
QbzTheme { id: theme }
readonly property color tone: variant === "error" ? theme.danger
: variant === "info" ? theme.accent
: variant === "success" ? theme.success : theme.warning
readonly property string toneTint: variant === "error" ? "favorite"
: variant === "info" ? "accent"
: variant === "success" ? "accent" : "warning"
width: parent ? parent.width : 0
height: row.implicitHeight + 24
radius: 8
color: Qt.rgba(tone.r, tone.g, tone.b, 0.10)
border.width: 1
border.color: Qt.rgba(tone.r, tone.g, tone.b, 0.30)
Row {
id: row
anchors.left: parent.left
anchors.right: parent.right
anchors.top: parent.top
anchors.margins: 12
spacing: 10
QbzIcon {
name: "info"
tintName: root.toneTint
width: 16
height: 16
}
Column {
width: parent.width - 26
spacing: 3
Text {
visible: root.title !== ""
width: parent.width
text: root.title
color: root.tone
font.pixelSize: theme.fontLegal
font.weight: theme.weightSemibold
wrapMode: Text.WordWrap
}
Text {
visible: root.body !== ""
width: parent.width
text: root.body
color: theme.textSecondary
font.pixelSize: theme.fontLegal
wrapMode: Text.WordWrap
}
}
}
}