Commit 74a68a58 authored by Matthias Clasen's avatar Matthias Clasen
Browse files

Merge branch 'theme-fallback-fix' into 'master'

themes: Make fallback work a bit better

See merge request !3441
parents 9b7f927b 9f6b3e17
Pipeline #275056 passed with stages
in 34 minutes and 53 seconds
...@@ -1384,7 +1384,12 @@ gtk_css_provider_load_named (GtkCssProvider *provider, ...@@ -1384,7 +1384,12 @@ gtk_css_provider_load_named (GtkCssProvider *provider,
} }
else else
{ {
/* Things failed! Fall back! Fall back! */ /* Things failed! Fall back! Fall back!
*
* We accept the names HighContrast, HighContrastInverse,
* Adwaita and Adwaita-dark as aliases for the variants
* of the Default theme.
*/
if (strcmp (name, "HighContrast") == 0) if (strcmp (name, "HighContrast") == 0)
{ {
if (g_strcmp0 (variant, "dark") == 0) if (g_strcmp0 (variant, "dark") == 0)
...@@ -1394,6 +1399,8 @@ gtk_css_provider_load_named (GtkCssProvider *provider, ...@@ -1394,6 +1399,8 @@ gtk_css_provider_load_named (GtkCssProvider *provider,
} }
else if (strcmp (name, "HighConstrastInverse") == 0) else if (strcmp (name, "HighConstrastInverse") == 0)
gtk_css_provider_load_named (provider, DEFAULT_THEME_NAME, "hc-dark"); gtk_css_provider_load_named (provider, DEFAULT_THEME_NAME, "hc-dark");
else if (strcmp (name, "Adwaita-dark") == 0)
gtk_css_provider_load_named (provider, DEFAULT_THEME_NAME, "dark");
else if (strcmp (name, DEFAULT_THEME_NAME) != 0) else if (strcmp (name, DEFAULT_THEME_NAME) != 0)
gtk_css_provider_load_named (provider, DEFAULT_THEME_NAME, variant); gtk_css_provider_load_named (provider, DEFAULT_THEME_NAME, variant);
else else
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment