Daniel Brötzmann pushed to branch gtk4 at gajim / gajim


Commits:
3c4d3bdd by wurstsalat at 2024-10-05T11:02:42+02:00
fix resizing window on startup

- - - - -


2 changed files:

- gajim/gtk/main.py
- gajim/gtk/util.py


Changes:

=====================================
gajim/gtk/main.py
=====================================
@@ -225,6 +225,7 @@ def _prepare_window(self) -> None:
         resize_window(self, window_width, window_height)
         restore_main_window_position()
 
+        # GdkX11.X11Surface
         # self.set_skip_taskbar_hint(not app.settings.get('show_in_taskbar'))
         # TODO GTK4
         self.show()


=====================================
gajim/gtk/util.py
=====================================
@@ -52,7 +52,8 @@
 from gajim.common.styling import PlainBlock
 from gajim.common.util.user_strings import format_idle_time
 
-from gajim.gtk.const import GDK_MEMORY_DEFAULT, WINDOW_MODULES
+from gajim.gtk.const import GDK_MEMORY_DEFAULT
+from gajim.gtk.const import WINDOW_MODULES
 
 log = logging.getLogger('gajim.gtk.util')
 
@@ -203,8 +204,7 @@ def resize_window(window: Gtk.Window, width: int, height: 
int) -> None:
 
     width = min(width, screen_w)
     height = min(height, screen_h)
-    return # TODO GTK4
-    window.resize(abs(width), abs(height))
+    window.set_default_size(abs(width), abs(height))
 
 
 def move_window(window: Gtk.Window, pos_x: int, pos_y: int) -> None:



View it on GitLab: 
https://dev.gajim.org/gajim/gajim/-/commit/3c4d3bddeea9bbfb4f6e10eddc57e2752762ca79

-- 
View it on GitLab: 
https://dev.gajim.org/gajim/gajim/-/commit/3c4d3bddeea9bbfb4f6e10eddc57e2752762ca79
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