ocarina: Add a switch for tab label expanding
Pass in true to cause the tab label to expand and fill up the entire space, false if the label should not expand.
This commit is contained in:
parent
2110319176
commit
b8f977cc35
|
@ -4,6 +4,6 @@
|
|||
#include <ocarina/gtk.h>
|
||||
|
||||
GtkWidget *get_tabs();
|
||||
void add_page(GtkWidget *, GtkWidget *);
|
||||
void add_page(GtkWidget *, GtkWidget *, bool);
|
||||
|
||||
#endif /* OCARINA_BODY_H */
|
||||
|
|
|
@ -17,7 +17,14 @@ GtkWidget *get_tabs()
|
|||
return tabs;
|
||||
}
|
||||
|
||||
void add_page(GtkWidget *label, GtkWidget *content)
|
||||
void add_page(GtkWidget *label, GtkWidget *content, bool fill)
|
||||
{
|
||||
gtk_notebook_append_page(GTK_NOTEBOOK(tabs), content, label);
|
||||
if (fill == true) {
|
||||
gtk_notebook_set_tab_label_packing(GTK_NOTEBOOK(tabs),
|
||||
content,
|
||||
TRUE,
|
||||
TRUE,
|
||||
GTK_PACK_START);
|
||||
}
|
||||
};
|
||||
|
|
|
@ -11,5 +11,5 @@ void settings_init()
|
|||
|
||||
gtk_widget_show(image);
|
||||
gtk_widget_show(tabs);
|
||||
add_page(image, tabs);
|
||||
add_page(image, tabs, false);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user