RedFlag/desktop/qml/Theme.qml
Fimeg 67e26be2d9 projection: begin the exact-path public epoch
The public tree and its history contain only the listed paths. Earlier projection history remains preserved internally.

Source-Sha: 913fde029b935671833254797f0f20f1eb9fabba

Policy-Sha: 913fde029b935671833254797f0f20f1eb9fabba

Tree-Digest: 180ae530c1058a2a5c89837bdce2d323ae83e669e38590ca72e75b8d92b7262f
2026-09-08 21:59:33 -04:00

49 lines
2.2 KiB
QML

pragma Singleton
import QtQuick
QtObject {
property bool dark: true
readonly property color window: dark ? "#1b1d1e" : "#e5e5df"
readonly property color rail: dark ? "#181a1b" : "#ffffff"
readonly property color surface: dark ? "#181a1b" : "#ffffff"
readonly property color raised: dark ? "#252a2e" : "#efefe9"
readonly property color hover: dark ? "#2a2d2f" : "#eef2f6"
readonly property color divider: dark ? "#393d40" : "#dce1e7"
readonly property color text: dark ? "#e5e2dc" : "#171a1f"
readonly property color dim: dark ? "#b2aca2" : "#5f6874"
readonly property color faint: dark ? "#979084" : "#8a939e"
readonly property color red: "#ef2525"
readonly property color redDim: dark ? "#380b0b" : "#fee2e2"
readonly property color good: "#32bd74"
readonly property color warn: "#e5a936"
readonly property color bad: "#ef5350"
readonly property color blue: dark ? "#85add6" : "#336699"
readonly property color selection: dark ? "#23394b" : "#d9e6f2"
readonly property color titlebar: "#336699"
readonly property color bevelLight: dark ? "#465057" : "#ffffff"
readonly property color bevelDark: dark ? "#111517" : "#a4aaa9"
readonly property color purple: "#ad7aff"
readonly property color cyan: "#30b8c9"
readonly property int railWidth: 216
readonly property int headerHeight: 72
readonly property int radius: 3
readonly property int radiusSm: 2
readonly property int spacing: 14
readonly property int spacingSm: 8
readonly property int fontTitle: 23
readonly property int fontHeading: 17
readonly property int fontBody: 14
readonly property int fontMeta: 12
readonly property string mono: {
const wanted = ["JetBrainsMono NF", "Cascadia Mono", "Consolas", "Adwaita Mono", "DejaVu Sans Mono"]
const installed = Qt.fontFamilies()
for (let i = 0; i < wanted.length; ++i)
if (installed.indexOf(wanted[i]) >= 0) return wanted[i]
return "monospace"
}
function tint(color, alpha) { return Qt.rgba(color.r, color.g, color.b, alpha) }
function pressure(percent) { return percent >= 90 ? bad : percent >= 75 ? warn : good }
}