Formatting + tray menu bg color back to "surface"

This commit is contained in:
quadbyte 2025-08-18 09:27:05 -04:00
parent 599b484c42
commit 176a997018
4 changed files with 11 additions and 9 deletions

View file

@ -93,8 +93,7 @@ Row {
}
}
}
}// Row {
// id: layout
} // Row {// id: layout
// anchors.verticalCenter: parent.verticalCenter
// spacing: Style.marginSmall * scaling
// visible: Settings.data.bar.showSystemInfo

View file

@ -83,7 +83,7 @@ PopupWindow {
Rectangle {
anchors.fill: parent
color: Color.mSurfaceVariant
color: Color.mSurface
border.color: Color.mOutline
border.width: Math.max(1, Style.borderThin * scaling)
radius: Style.radiusMedium * scaling

View file

@ -23,7 +23,8 @@ ColumnLayout {
if (entry.dark || entry.light) {
variant = Settings.data.colorSchemes.darkMode ? (entry.dark || entry.light) : (entry.light || entry.dark)
}
if (variant && variant[colorKey]) return variant[colorKey]
if (variant && variant[colorKey])
return variant[colorKey]
}
// Return a default color if not cached yet
@ -122,9 +123,7 @@ ColumnLayout {
// Dark Mode Toggle (affects both Matugen and predefined schemes that provide variants)
NToggle {
label: "Dark Mode"
description: Settings.data.colorSchemes.useWallpaperColors
? "Generate dark theme colors when using Matugen. Disable for light theme."
: "If the selected predefined scheme has light/dark variants, this chooses which one."
description: Settings.data.colorSchemes.useWallpaperColors ? "Generate dark theme colors when using Matugen. Disable for light theme." : "If the selected predefined scheme has light/dark variants, this chooses which one."
checked: Settings.data.colorSchemes.darkMode
enabled: true
onToggled: checked => {
@ -135,7 +134,9 @@ ColumnLayout {
// Re-apply current scheme to pick the right variant
ColorSchemeService.applyScheme(Settings.data.colorSchemes.predefinedScheme)
// Force refresh of previews
var tmp = schemeColorsCache; schemeColorsCache = {}; schemeColorsCache = tmp
var tmp = schemeColorsCache
schemeColorsCache = {}
schemeColorsCache = tmp
}
}
}

View file

@ -113,7 +113,9 @@ Singleton {
}
function writeColorsToDisk(obj) {
function pick(o, a, b, fallback) { return (o && (o[a] || o[b])) || fallback }
function pick(o, a, b, fallback) {
return (o && (o[a] || o[b])) || fallback
}
out.mPrimary = pick(obj, "mPrimary", "primary", out.mPrimary)
out.mOnPrimary = pick(obj, "mOnPrimary", "onPrimary", out.mOnPrimary)
out.mSecondary = pick(obj, "mSecondary", "secondary", out.mSecondary)