Philipp Hörist pushed to branch windows-adwaita-css at gajim / gajim
Commits:
4b1dec40 by wurstsalat at 2025-07-06T09:52:42+02:00
fix: Status icon: Call shutdown when handling Gajim core shutdown
- - - - -
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
- - - - -
3 changed files:
- gajim/common/application.py
- + gajim/data/style/windows.css
- gajim/gtk/css_config.py
Changes:
=====================================
gajim/common/application.py
=====================================
@@ -215,8 +215,6 @@ def end_profiling(self) -> None:
ps.print_stats()
def start_shutdown(self) -> None:
- app.app.systray.shutdown()
-
accounts_to_disconnect: dict[str, Client] = {}
for client in app.get_clients():
@@ -247,7 +245,9 @@ def _shutdown_core(self) -> None:
app.storage.cache.shutdown()
app.storage.archive.shutdown()
app.settings.shutdown()
+
self.end_profiling()
+ app.app.systray.shutdown()
configpaths.cleanup_temp()
logind.shutdown()
=====================================
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/-/compare/811518d075cd3e011cee7ba6b046c572fe6b965e...2566dc7a266a13e8b9a1986e0b6891390bc3ab15
--
View it on GitLab:
https://dev.gajim.org/gajim/gajim/-/compare/811518d075cd3e011cee7ba6b046c572fe6b965e...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]