--- a/application/main.c Wed Dec 04 18:31:22 2024 +0100 +++ b/application/main.c Wed Dec 04 20:36:16 2024 +0100 @@ -463,12 +463,40 @@ void application_startup(UiEvent *event, void *data) { UiObject *obj = ui_window("Test", NULL); - ui_button(obj, .label = "Test Button", .onclick = action_button); - ui_togglebutton(obj, .label = "Togglebutton"); - ui_checkbox(obj, .label = "Checkbox", .enable_group = 123); - ui_checkbox(obj, .label = "Checkbox Disabled", .groups = UI_GROUPS(123)); - ui_radiobutton(obj, .label = "Radio 1", .varname = "radio"); - ui_radiobutton(obj, .label = "Radio 2", .varname = "radio"); + + ui_grid(obj, .margin = 10) { + ui_button(obj, .label = "Test Button", .onclick = action_button); + ui_newline(obj); + + ui_togglebutton(obj, .label = "Togglebutton"); + ui_togglebutton(obj, .label = "XY", .hfill = TRUE); + ui_togglebutton(obj, .label = "AB", .hfill = TRUE); + ui_togglebutton(obj, .label = "ZZ", .hexpand = TRUE, .hfill = TRUE); + ui_newline(obj); + + ui_hbox(obj, .colspan = 2) { + ui_checkbox(obj, .label = "Checkbox", .enable_group = 123); + ui_checkbox(obj, .label = "Checkbox Disabled", .groups = UI_GROUPS(123)); + } + ui_newline(obj); + + + ui_hbox(obj, .colspan = 4) { + ui_radiobutton(obj, .label = "Radio 1", .varname = "radio"); + ui_radiobutton(obj, .label = "Radio 2", .varname = "radio"); + } + ui_newline(obj); + + ui_hbox(obj, .vexpand = TRUE, .vfill = TRUE) { + ui_button(obj, .label = "F1"); + ui_button(obj, .label = "F2"); + ui_button(obj, .label = "F3"); + } + + } + + + ui_show(obj); }