Re: GtkPopover bug ?
- From: Florian Müllner <fmuellner gnome org>
- To: "Victor A. Santos" <victoraur santos gmail com>
- Cc: gtk-devel-list <gtk-devel-list gnome org>
- Subject: Re: GtkPopover bug ?
- Date: Thu, 19 Jun 2014 09:57:26 +0200
On Wed, Jun 18, 2014 at 11:48 PM, Victor A. Santos
<victoraur santos gmail com> wrote:
popover = gtk_popover_new (window);
This doesn't make sense - relative_to is the widget the popup should
point to inside window, so you'd want mbutton here; however
gtk_menu_button_set_popover() will already take care of that, so
passing NULL should be fine.
button = gtk_button_new_with_label ("Test");
gtk_container_add (GTK_CONTAINER (popover), button);
The popover is not part of the widget hierarchy of window, so the
gtk_widget_show_all() call misses button.
mbutton = gtk_menu_button_new ();
gtk_menu_button_set_popover (GTK_MENU_BUTTON (mbutton), popover);
gtk_container_add (GTK_CONTAINER (window), mbutton);
Here is the actual problem - the popover is constrained to the
toplevel window and set up to point to a widget that fills the entire
toplevel - there's simply no space for the popover to appear. If you
do something like:
gtk_widget_set_halign (mbutton, GTK_ALIGN_START);
the popover should work.
Cheers,
Florian
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]