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
74 lines
2.2 KiB
QML
74 lines
2.2 KiB
QML
// 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
|
|
}
|
|
}
|
|
}
|
|
}
|