diff options
author | Carlos Garcia Campos <carlosgc@gnome.org> | 2005-05-15 18:36:10 (GMT) |
---|---|---|
committer | Carlos Garcia Campos <carlosgc@src.gnome.org> | 2005-05-15 18:36:10 (GMT) |
commit | afa82f9627fa9d9f58699cdb44389a483617048e (patch) | |
tree | 07e647319d229fb95f9965107ed117a355be2030 /shell/ev-sidebar.c | |
parent | f7510970589ab3a687023b127803ae6d11d41aca (diff) |
make the drop down menu as width as the toggle button.
2005-05-15 Carlos Garcia Campos <carlosgc@gnome.org>
* shell/ev-sidebar.c: make the drop down menu as width as the toggle
button.
Diffstat (limited to 'shell/ev-sidebar.c')
-rw-r--r-- | shell/ev-sidebar.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/shell/ev-sidebar.c b/shell/ev-sidebar.c index 3ba66ad..f687d10 100644 --- a/shell/ev-sidebar.c +++ b/shell/ev-sidebar.c @@ -115,6 +115,15 @@ ev_sidebar_select_button_press_cb (GtkWidget *widget, EvSidebar *ev_sidebar = EV_SIDEBAR (user_data); if (event->button == 1) { + GtkRequisition requisition; + gint width; + + width = widget->allocation.width; + gtk_widget_set_size_request (ev_sidebar->priv->menu, -1, -1); + gtk_widget_size_request (ev_sidebar->priv->menu, &requisition); + gtk_widget_set_size_request (ev_sidebar->priv->menu, + MAX (width, requisition.width), -1); + gtk_widget_grab_focus (widget); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (widget), TRUE); |