ui/gtk/headerbar.c

branch
newapi
changeset 308
4efc7c19e31d
parent 307
301d6c73087a
child 309
02c95df91de1
equal deleted inserted replaced
307:301d6c73087a 308:4efc7c19e31d
26 * POSSIBILITY OF SUCH DAMAGE. 26 * POSSIBILITY OF SUCH DAMAGE.
27 */ 27 */
28 28
29 #include "headerbar.h" 29 #include "headerbar.h"
30 30
31 31 #include "button.h"
32 32
33 #if GTK_MAJOR_VERSION >= 3 33 #if GTK_MAJOR_VERSION >= 3
34 34
35 #ifdef UI_LIBADWAITA 35 #ifdef UI_LIBADWAITA
36 #define UI_HEADERBAR AdwHeaderBar* 36 #define UI_HEADERBAR AdwHeaderBar*
115 create_item(obj, headerbar, box, item, pos); 115 create_item(obj, headerbar, box, item, pos);
116 } 116 }
117 } 117 }
118 118
119 void ui_add_headerbar_item(GtkWidget *headerbar, GtkWidget *box, UiToolbarItem *item, UiObject *obj, enum UiToolbarPos pos) { 119 void ui_add_headerbar_item(GtkWidget *headerbar, GtkWidget *box, UiToolbarItem *item, UiObject *obj, enum UiToolbarPos pos) {
120 GtkWidget *button = gtk_button_new_with_label(item->args.label); 120 GtkWidget *button = ui_create_button(obj, item->args.label, item->args.icon, item->args.onclick, item->args.onclickdata);
121 WIDGET_ADD_CSS_CLASS(button, "flat"); 121 WIDGET_ADD_CSS_CLASS(button, "flat");
122 headerbar_add(headerbar, box, button, pos); 122 headerbar_add(headerbar, box, button, pos);
123 } 123 }
124 124
125 #endif 125 #endif

mercurial