[gimp] themes: do not set a background-color on all .horizontal class widgets.



commit b48bd7d3376658a947ded193547b126350b04327
Author: Jehan <jehan girinstud io>
Date:   Tue Sep 27 22:54:54 2022 +0200

    themes: do not set a background-color on all .horizontal class widgets.
    
    This was massively breaking GtkScale rendering. Or at least the marks (and mark
    texts) added by gtk_scale_add_mark() were simply invisible.
    I tried to figure why, staring at the GTK inspector and testing various CSS
    rules to fix it without removing this line, but just couldn't make sense of it.
    In the end, I'll just remove this line. It looks like in CSS (or just GTK CSS?),
    it might be better to set rules on accurate widgets rather than too broad rules. 🤷

 themes/Default/common.css | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/themes/Default/common.css b/themes/Default/common.css
index eb938ccc79..06d6ee9029 100644
--- a/themes/Default/common.css
+++ b/themes/Default/common.css
@@ -127,10 +127,13 @@ notebook header tabs tab:hover {
 
 /* Background for many button bars and dialog titles.
  * Also, unexpectedly, controls the prefs "Reload Current Theme" button content.
+ *
+ * Warning: setting a background-color here "breaks" the marks added by
+ * gtk_scale_add_mark() on a GtkScale. I'm still unsure why, but the conclusion
+ * is probably that it's a bad idea to set too broad background-color rules.
  */
 .horizontal {
   color: @fg-color;
-  background-color: @bg-color;
 }
 
 /* Text buttons, e.g. the main buttons at the bottoms of dialogs,


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]