--- a/application/main.c Thu Nov 21 12:04:53 2024 +0100 +++ b/application/main.c Thu Nov 21 13:17:56 2024 +0100 @@ -239,6 +239,8 @@ ui_show(obj); } +UiMenuBuilder *menubuilder; + void application_startup(UiEvent *event, void *data) { // global list UiContext *global = ui_global_context(); @@ -327,7 +329,7 @@ } ui_tab(obj, "Tab 5") { ui_button(obj, .label = "Test Button", .icon = "application-x-generic", .onclick = action_button); - ui_imageviewer(obj, .varname = "image", .style_class = "imageviewer"); + ui_imageviewer(obj, .varname = "image", .style_class = "imageviewer", .contextmenu = menubuilder); } ui_tab(obj, "Tab 6") { @@ -369,7 +371,6 @@ ui_menuitem(.label = "Test"); } - UiMenuBuilder *menubuilder; ui_contextmenu(&menubuilder) { ui_menuitem(.label = "Context Item 1"); ui_menuitem(.label = "Context Item 2");