Commit 63f6aca1 authored by Matthias Clasen's avatar Matthias Clasen
Browse files

fishbowl: Add a menubutton demo

This reveals some issues with the position tracking.
parent 6c3e8747
Pipeline #83769 passed with stages
in 29 minutes and 50 seconds
...@@ -164,6 +164,19 @@ create_switch (void) ...@@ -164,6 +164,19 @@ create_switch (void)
return w; return w;
} }
static GtkWidget *
create_menu_button (void)
{
GtkWidget *w = gtk_menu_button_new ();
GtkWidget *popover = gtk_popover_new (NULL);
gtk_container_add (GTK_CONTAINER (popover), gtk_button_new_with_label ("Hey!"));
gtk_menu_button_set_popover (GTK_MENU_BUTTON (w), popover);
gtk_menu_button_popup (GTK_MENU_BUTTON (w));
return w;
}
static const struct { static const struct {
const char *name; const char *name;
GtkWidget * (*create_func) (void); GtkWidget * (*create_func) (void);
...@@ -179,6 +192,7 @@ static const struct { ...@@ -179,6 +192,7 @@ static const struct {
{ "Video", create_video }, { "Video", create_video },
{ "Gears", create_gears }, { "Gears", create_gears },
{ "Switch", create_switch }, { "Switch", create_switch },
{ "Menubutton", create_menu_button },
}; };
static int selected_widget_type = -1; static int selected_widget_type = -1;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment