mirror of
https://github.com/Rafostar/clapper.git
synced 2025-08-31 08:21:59 +02:00
Use rounded corners with every theme
AFAIK there is no way to detect theme rounded corners. Having 2/4 corners rounded in floating mode is not good.
This commit is contained in:
@@ -93,13 +93,14 @@ class ClapperAppBase extends Gtk.Application
|
|||||||
_onThemeChanged(gtkSettings)
|
_onThemeChanged(gtkSettings)
|
||||||
{
|
{
|
||||||
const theme = gtkSettings.gtk_theme_name;
|
const theme = gtkSettings.gtk_theme_name;
|
||||||
|
const window = this.active_window;
|
||||||
|
|
||||||
debug(`user selected theme: ${theme}`);
|
debug(`user selected theme: ${theme}`);
|
||||||
|
|
||||||
if(
|
/* FIXME: AFAIK there is no way to detect theme rounded corners.
|
||||||
theme.startsWith('Adwaita')
|
Having 2/4 corners rounded in floating mode is not good. */
|
||||||
&& !this.active_window.has_css_class('adwrounded')
|
if(!window.has_css_class('adwrounded'))
|
||||||
)
|
window.add_css_class('adwrounded');
|
||||||
this.active_window.add_css_class('adwrounded');
|
|
||||||
|
|
||||||
if(!theme.endsWith('-dark'))
|
if(!theme.endsWith('-dark'))
|
||||||
return;
|
return;
|
||||||
|
Reference in New Issue
Block a user