mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-05-13 07:42:46 -04:00
Theme: expose tertiary on the singleton (was undefined in dynamic mode) (#2375)
The dynamic-mode currentThemeData object at Theme.qml:447-468 omitted tertiary entirely, even though matugen generates it and writes it to the matugen colors JSON. As a result, Theme.tertiary returned undefined in dynamic mode, and any QML binding through .r/.g/.b/.a defaulted to white — visible as desaturated near-white highlights in the bar's ChromeShader (which mixes Theme.tertiary at highlight peaks). Two-line fix: - Add tertiary to the dynamic-mode currentThemeData via getMatugenColor - Add property color tertiary on the Theme singleton, falling back to secondary if tertiary is absent (covers the stock-theme path where tertiary is added separately via buildMatugenColorsFromTheme:1811) Fallback hex #efb8c8 is the M3 baseline tertiary (light pink) for dark mode, in case matugen output is missing. Theme.tertiary was already referenced at LockScreenContent.qml:737 so the property name is the right one. Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -450,6 +450,7 @@ Singleton {
|
|||||||
"primaryText": getMatugenColor("on_primary", "#ffffff"),
|
"primaryText": getMatugenColor("on_primary", "#ffffff"),
|
||||||
"primaryContainer": getMatugenColor("primary_container", "#1976d2"),
|
"primaryContainer": getMatugenColor("primary_container", "#1976d2"),
|
||||||
"secondary": getMatugenColor("secondary", "#8ab4f8"),
|
"secondary": getMatugenColor("secondary", "#8ab4f8"),
|
||||||
|
"tertiary": getMatugenColor("tertiary", "#efb8c8"),
|
||||||
"surface": getMatugenColor("surface", "#1a1c1e"),
|
"surface": getMatugenColor("surface", "#1a1c1e"),
|
||||||
"surfaceText": getMatugenColor("on_background", "#e3e8ef"),
|
"surfaceText": getMatugenColor("on_background", "#e3e8ef"),
|
||||||
"surfaceVariant": getMatugenColor("surface_variant", "#44464f"),
|
"surfaceVariant": getMatugenColor("surface_variant", "#44464f"),
|
||||||
@@ -522,6 +523,7 @@ Singleton {
|
|||||||
property color primaryText: currentThemeData.primaryText
|
property color primaryText: currentThemeData.primaryText
|
||||||
property color primaryContainer: currentThemeData.primaryContainer
|
property color primaryContainer: currentThemeData.primaryContainer
|
||||||
property color secondary: currentThemeData.secondary
|
property color secondary: currentThemeData.secondary
|
||||||
|
property color tertiary: currentThemeData.tertiary || currentThemeData.secondary
|
||||||
property color surface: currentThemeData.surface
|
property color surface: currentThemeData.surface
|
||||||
property color surfaceText: currentThemeData.surfaceText
|
property color surfaceText: currentThemeData.surfaceText
|
||||||
property color surfaceVariant: currentThemeData.surfaceVariant
|
property color surfaceVariant: currentThemeData.surfaceVariant
|
||||||
|
|||||||
Reference in New Issue
Block a user