fix gtk3/4 grid hexpand/vexpand setting newapi

Sun, 22 Sep 2024 17:54:33 +0200

author
Olaf Wintermann <olaf.wintermann@gmail.com>
date
Sun, 22 Sep 2024 17:54:33 +0200
branch
newapi
changeset 303
dc8b504604f4
parent 302
b00cbbfeec7a
child 304
d554b2a60105

fix gtk3/4 grid hexpand/vexpand setting

ui/gtk/container.c file | annotate | diff | comparison | revisions
--- a/ui/gtk/container.c	Sun Sep 22 16:39:10 2024 +0200
+++ b/ui/gtk/container.c	Sun Sep 22 17:54:33 2024 +0200
@@ -150,12 +150,8 @@
         vexpand = ct->layout.vexpand;
     }
     
-    if(hexpand) {
-        gtk_widget_set_hexpand(widget, TRUE);
-    }
-    if(vexpand) {
-        gtk_widget_set_vexpand(widget, TRUE);
-    }
+    gtk_widget_set_hexpand(widget, hexpand);
+    gtk_widget_set_vexpand(widget, vexpand);
     
     int colspan = ct->layout.colspan > 0 ? ct->layout.colspan : 1;
     int rowspan = ct->layout.rowspan > 0 ? ct->layout.rowspan : 1;

mercurial