Philipp Hörist pushed to branch master at gajim / gajim


Commits:
2566dc7a by wurstsalat at 2025-07-06T15:37:30+00:00
fix: Styling: Add extra CSS on Windows to fix issues

- window shadow would prevent clicks on underlying windows
- monospace font is not installed on Windows

Fixes #12333

- - - - -


2 changed files:

- + gajim/data/style/windows.css
- gajim/gtk/css_config.py


Changes:

=====================================
gajim/data/style/windows.css
=====================================
@@ -0,0 +1,10 @@
+.csd {
+  box-shadow: 0 3px 9px 1px alpha(black, 0.2), 0 0 0 1px alpha(black, 0.18);
+}
+.csd:backdrop {
+  box-shadow: 0 3px 9px 1px transparent, 0 2px 6px 2px alpha(black, 0.1),
+    0 0 0 1px alpha(black, 0.06);
+}
+.monospace {
+  font-family: monospace;
+}


=====================================
gajim/gtk/css_config.py
=====================================
@@ -125,6 +125,9 @@ def __init__(self) -> None:
 
         self.apply_app_font_size()
 
+        if sys.platform == "win32":
+            self._apply_windows_css()
+
     @property
     def prefer_dark(self) -> bool:
         setting = app.settings.get("dark_theme")
@@ -202,6 +205,12 @@ def apply_app_font_size(self) -> None:
             GLib.Bytes.new(css.encode("utf-8"))
         )
 
+    def _apply_windows_css(self) -> None:
+        """Apply extra CSS on Windows to fix issues, see:
+        https://gitlab.gnome.org/GNOME/libadwaita/-/issues/1053
+        """
+        self._load_css_from_file("windows.css", CSSPriority.APPLICATION)
+
     @staticmethod
     def _pango_to_css_weight(number: int) -> int:
         # Pango allows for weight values between 100 and 1000



View it on GitLab: 
https://dev.gajim.org/gajim/gajim/-/commit/2566dc7a266a13e8b9a1986e0b6891390bc3ab15

-- 
View it on GitLab: 
https://dev.gajim.org/gajim/gajim/-/commit/2566dc7a266a13e8b9a1986e0b6891390bc3ab15
You're receiving this email because of your account on dev.gajim.org.


_______________________________________________
Commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to