mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-28 22:41:43 +00:00
Merge branch 'theme-fallback-fix' into 'master'
themes: Make fallback work a bit better See merge request GNOME/gtk!3441
This commit is contained in:
commit
74a68a5803
@ -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,
|
|||||||
}
|
}
|
||||||
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
|
||||||
|
Loading…
Reference in New Issue
Block a user