feat(auto-theme): read full DE color scheme for system theme
Instead of using wallpaper k-means + accent override (which produced wrong backgrounds), the system source now reads ALL colors from the DE config (kdeglobals for KDE, dconf hints for GNOME). Maps Window/View/Button/Selection/Header sections directly to CSS variables — bg-primary from Window, bg-secondary from View, bg-tertiary from Button, accent from Selection, text from ForegroundNormal, etc. Adds SystemColorScheme type, get_system_color_scheme() in system.rs, generate_theme_from_scheme() in generator.rs, and two new V2 commands: v2_generate_theme_from_system_colors and v2_get_system_color_scheme. Frontend tryAccentColorTheme() replaced with trySystemColorSchemeTheme() which calls the new endpoint. Old color math helpers removed.
This commit is contained in:
6 files changed
+390
-138
No files matched your search
@@ -1110,6 +1110,8 @@ pub fn run() {
|
||||
commands_v2::v2_get_system_accent_color,
|
||||
commands_v2::v2_generate_theme_from_image,
|
||||
commands_v2::v2_generate_theme_from_wallpaper,
|
||||
commands_v2::v2_generate_theme_from_system_colors,
|
||||
commands_v2::v2_get_system_color_scheme,
|
||||
commands_v2::v2_extract_palette,
|
||||
])
|
||||
.run(tauri::generate_context!())
|
||||
|
||||
Reference in new issue
Block a user