Files
dotfiles/quickshell/services/Theme.qml
T
2026-11-17 18:15:16 +07:00

27 lines
1.4 KiB
QML

pragma Singleton
import QtQuick
import Quickshell
Singleton {
// Material 3 Expressive tonal surfaces, shared across all form factors.
readonly property bool dark: Preferences.data.theme !== "light"
readonly property bool oled: Preferences.data.theme === "amoled"
readonly property color background: oled ? "#000000" : dark ? "#141218" : "#fdf7ff"
readonly property color surface: oled ? "#101014" : dark ? "#211f26" : "#f3edf7"
readonly property color surfaceHigh: oled ? "#202026" : dark ? "#36343b" : "#e7e0ec"
readonly property color surfaceLow: oled ? "#09090c" : dark ? "#1d1b20" : "#f7f2fa"
readonly property color foreground: dark ? "#e6e0e9" : "#1d1b20"
readonly property color primary: dark ? "#d0bcff" : "#6750a4"
readonly property color onPrimary: dark ? "#381e72" : "#ffffff"
readonly property color primaryContainer: dark ? "#4f378b" : "#eaddff"
readonly property color onPrimaryContainer: dark ? "#eaddff" : "#21005d"
readonly property color secondaryContainer: dark ? "#4a4458" : "#e8def8"
readonly property color outline: dark ? "#938f99" : "#79747e"
readonly property int touchSize: 48
readonly property int radius: 24
readonly property int radiusLarge: 32
readonly property int duration: Preferences.data.reducedMotion ? 0 : 240
function isCompact(mode) { return mode === "phone"; }
function cardRadius(mode) { return mode === "desktop" ? 28 : 32; }
}