From 23ef3bb85f1e7c60f56dffad050576400b2997ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Dzi=C4=99giel?= Date: Tue, 9 Feb 2021 12:40:11 +0100 Subject: [PATCH] Optimize sliders for GTK 4.1 --- css/styles.css | 7 ++++++- src/appBase.js | 3 +++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/css/styles.css b/css/styles.css index 94291383..fb880fcc 100644 --- a/css/styles.css +++ b/css/styles.css @@ -26,6 +26,12 @@ radio { .osd list { background: none; } +.gtk41 trough highlight { + border-color: transparent; +} +.gtk41 .osd trough highlight { + border-color: inherit; +} .osd .playercontrols { -gtk-icon-size: 24px; @@ -159,7 +165,6 @@ radio { } .overamp trough highlight { background: @error_color; - border-color: @error_color; } /* Elapsed Popover */ diff --git a/src/appBase.js b/src/appBase.js index a3617531..f1e7bb19 100644 --- a/src/appBase.js +++ b/src/appBase.js @@ -27,6 +27,9 @@ class ClapperAppBase extends Gtk.Application title: Misc.appName, }); + if(Gtk.MINOR_VERSION > 0) + window.add_css_class('gtk41'); + if(!settings.get_boolean('render-shadows')) window.add_css_class('gpufriendly');