atlas-editor: fix expansion of drawing area

Sun, 24 May 2026 13:04:25 +0200

author
Mike Becker <universe@uap-core.de>
date
Sun, 24 May 2026 13:04:25 +0200
changeset 309
8124d12deb04
parent 308
ef85db003415
child 310
9212be32d7a2

atlas-editor: fix expansion of drawing area

tools/atlas-editor.c file | annotate | diff | comparison | revisions
--- a/tools/atlas-editor.c	Fri May 22 23:44:11 2026 +0200
+++ b/tools/atlas-editor.c	Sun May 24 13:04:25 2026 +0200
@@ -32,11 +32,12 @@
     ui_draw_rect(g, 0, 0, g->width, g->height, true);
 }
 
-static void application_startup([[maybe_unused]] UiEvent *event, [[maybe_unused]]  void *data) {
+static void application_startup([[maybe_unused]] UiEvent *event, [[maybe_unused]] void *data) {
     UiObject *window = ui_window("Ascension - Texture Atlas Editor");
 
     ui_grid(window, .columnspacing = 10, .margin = 10, .fill = true) {
-        ui_frame(window, .hexpand = true, .hfill = true, .vexpand = true, .vfill = true) {
+        ui_frame(window, .hexpand = true, .hfill = true, .vexpand = true, .vfill = true,
+                 .subcontainer = UI_CONTAINER_NO_SUB) {
             ui_drawingarea(window, .draw = draw_atlas);
         }
         ui_vbox(window, .spacing = 5) {
@@ -48,7 +49,7 @@
             ui_separator(window);
             ui_grid(window, .columnspacing = 10, .rowspacing = 2, .def_vfill = true) {
                 ui_label(window, .label = "Tile Width:");
-                ui_textfield(window, .width = 20);
+                ui_textfield(window, .width = 20); // TODO: in current toolkit version, width is not accepted
                 ui_label(window, .label = "Tile Height:");
                 ui_textfield(window, .width = 20);
             }

mercurial