ui/gtk/button.c

branch
newapi
changeset 313
b679cc6059ab
parent 308
4efc7c19e31d
--- a/ui/gtk/button.c	Sun Sep 29 13:33:34 2024 +0200
+++ b/ui/gtk/button.c	Sun Sep 29 15:01:14 2024 +0200
@@ -90,6 +90,7 @@
 UIWIDGET ui_button_create(UiObject *obj, UiButtonArgs args) {
     UiObject* current = uic_current_obj(obj);
     GtkWidget *button = ui_create_button(obj, args.label, args.icon, args.onclick, args.onclickdata);
+    ui_set_name_and_style(button, args.name, args.style_class);
     UI_APPLY_LAYOUT1(current, args);
     current->container->add(current->container, button, FALSE);
     return button;
@@ -230,6 +231,7 @@
     UiObject* current = uic_current_obj(obj);
     
     ui_setup_togglebutton(current, widget, args.label, args.icon, args.varname, args.value, args.onchange, args.onchangedata);
+    ui_set_name_and_style(widget, args.name, args.style_class);
     
     UI_APPLY_LAYOUT1(current, args);
     current->container->add(current->container, widget, FALSE);
@@ -340,6 +342,7 @@
     }
     
     GtkWidget *rbutton = RADIOBUTTON_NEW(rg, args.label); 
+    ui_set_name_and_style(rbutton, args.name, args.style_class);
     if(rgroup) {
 #if GTK_MAJOR_VERSION >= 4
         if(rg) {

mercurial