Support "Default" theme

Adwaita was renamed to Default in latest GTK4 code.
We need to detect it and treat it the same way as we did for Adwaita.

More info in related GTK4 MR:
https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/3079
This commit is contained in:
Rafał Dzięgiel
2021-04-02 11:43:36 +02:00
parent 6a9c77dfad
commit 9502e062f4

View File

@@ -97,7 +97,7 @@ class ClapperAppBase extends Gtk.Application
if(!window.has_css_class('adwrounded'))
window.add_css_class('adwrounded');
if(theme.startsWith('Adwaita')) {
if(theme.startsWith('Adwaita') || theme.startsWith('Default')) {
const isDarkTheme = settings.get_boolean('dark-theme');
if(isDarkTheme && !hasAdwThemeDark)
@@ -125,7 +125,7 @@ class ClapperAppBase extends Gtk.Application
const window = this.active_window;
const hasAdwIcons = window.has_css_class('adwicons');
if(iconTheme === 'Adwaita') {
if(iconTheme === 'Adwaita' || iconTheme === 'Default') {
if(!hasAdwIcons)
window.add_css_class('adwicons');
}