diff -r 6727ea0f8fbe -r a612adaee43d ui/winui/commandbar.cpp --- a/ui/winui/commandbar.cpp Wed Nov 13 22:10:03 2024 +0100 +++ b/ui/winui/commandbar.cpp Thu Nov 14 17:25:23 2024 +0100 @@ -136,6 +136,11 @@ button.Icon(ui_get_icon(item->args.icon)); } + UIElement elm = button; + UiWidget* widget = new UiWidget(elm); + ui_context_add_widget_destructor(obj->ctx, widget); + ui_set_widget_groups(obj->ctx, widget, item->args.groups); + // register callback if (item->args.onclick) { ui_callback cbfunc = item->args.onclick; @@ -170,6 +175,7 @@ UIElement elm = button; UiWidget* widget = new UiWidget(elm); ui_context_add_widget_destructor(obj->ctx, widget); + ui_set_widget_groups(obj->ctx, widget, item->args.groups); UiInteger* value = (UiInteger*)var->value; int64_t i = value->value;