Daniel Brötzmann pushed to branch windows-adwaita-css at gajim / gajim
Commits:
811518d0 by wurstsalat at 2025-07-06T08:33:58+02: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/811518d075cd3e011cee7ba6b046c572fe6b965e
--
View it on GitLab:
https://dev.gajim.org/gajim/gajim/-/commit/811518d075cd3e011cee7ba6b046c572fe6b965e
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]