Files
client/native/ui/theme.slint
T

50 lines
2.8 KiB
Plaintext

export global Theme {
in-out property <bool> dark: true;
in-out property <bool> high-contrast: false;
in-out property <bool> reduced-motion: false;
in-out property <color> bg: dark ? #2b3346 : #f5f5f5;
in-out property <color> shaded: dark ? #222A3C : #ebebeb;
in-out property <color> header: dark ? #1c2539 : #ebebeb;
in-out property <color> contrast: dark ? #0C1326 : #C9D9E5;
in-out property <color> deviant: dark ? #1E2538 : #d3d5de;
in-out property <color> tint: dark ? #1588fa : #5da1cb;
in-out property <color> fg: dark ? #FFFFFF : #1a1a1a;
in-out property <color> muted: high-contrast ? fg : (dark ? #bbd6f3 : #445d77);
in-out property <color> error: dark ? #ff8282 : #aa2525;
in-out property <color> success: dark ? #13F78D : #006a3c;
in-out property <color> warning: dark ? #FF8B04 : #874900;
in-out property <color> outline: high-contrast ? fg : (dark ? #697A97 : #7b8c9e);
in-out property <string> font-family: "Noto Sans";
in-out property <length> font-size: 15px;
in-out property <length> touch-target: 44px;
in-out property <length> safe-top: 0px;
in-out property <length> safe-right: 0px;
in-out property <length> safe-bottom: 0px;
in-out property <length> safe-left: 0px;
in-out property <length> ime-inset: 0px;
// Shared controls use the official desktop density; touch platforms keep their hit targets.
in property <bool> touch-controls: false;
in property <color> tint-secondary: dark ? tint : #22658f;
in property <color> subtitle: dark ? #697a97 : #445d77;
in property <color> settings-highlight: dark ? #282f40 : deviant;
in property <color> error-light: dark ? #ff8282 : #da4d4d;
in property <color> toggle-checked: dark ? #17f78d : #01c00b;
in property <color> commander: #daa520;
in property <color> commander-talking-start: dark ? #ffb700 : #fb842e;
in property <color> commander-talking-stop: dark ? #bd8700 : #b05b24;
in property <color> button-hover: dark ? #1c82cc : #32729b4d;
in property <color> destructive-hover: dark ? #f84e4e : #df0f0f4d;
in property <int> normal-weight: 450;
in property <int> bold-weight: 700;
in property <length> small-font: font-size * 13 / 15;
in property <length> large-font: font-size * 16 / 15;
in property <length> button-height: 22px;
in property <length> field-height: 26px;
out property <brush> stock-button-fill: dark ? @linear-gradient(60deg, #0058ff, #1365bb) : @linear-gradient(-45deg, #5f87d5 1%, #8ea6ff);
out property <brush> stock-destructive-fill: dark ? @linear-gradient(0deg, #f33d3d, #ca3838) : @linear-gradient(-45deg, #df0f0f80 1%, #df0f0f4d);
in property <brush> button-fill: stock-button-fill;
in property <brush> destructive-fill: stock-destructive-fill;
out property <color> focus-ring: high-contrast ? fg : tint;
}