# HG changeset patch # User Olaf Wintermann # Date 1757867546 -7200 # Node ID 5ff4b9c0cf961c550c2c0155470be647a3b47faa # Parent 258ec399fbe66bda917660183ab30b86e9136c81 add ui_window_default_size function (GTK) diff -r 258ec399fbe6 -r 5ff4b9c0cf96 ui/gtk/window.c --- a/ui/gtk/window.c Sat Sep 13 19:53:50 2025 +0200 +++ b/ui/gtk/window.c Sun Sep 14 18:32:26 2025 +0200 @@ -338,6 +338,11 @@ height); } +void ui_window_default_size(UiObject *obj, int width, int height) { + window_default_width = width; + window_default_height = height; +} + #ifdef UI_LIBADWAITA static void dialog_response(AdwAlertDialog *self, gchar *response, UiEventData *data) { diff -r 258ec399fbe6 -r 5ff4b9c0cf96 ui/ui/window.h --- a/ui/ui/window.h Sat Sep 13 19:53:50 2025 +0200 +++ b/ui/ui/window.h Sun Sep 14 18:32:26 2025 +0200 @@ -81,6 +81,7 @@ #define ui_dialog_window0(parent) ui_dialog_window_create(parent, &(UiDialogWindowArgs){ 0 }); UIEXPORT void ui_window_size(UiObject *obj, int width, int height); +UIEXPORT void ui_window_default_size(UiObject *obj, int width, int height); #define ui_dialog(parent, ...) ui_dialog_create(parent, &(UiDialogArgs){ __VA_ARGS__ } )