]> www.fi.muni.cz Git - evince.git/commitdiff
make the drop down menu as width as the toggle button.
authorCarlos Garcia Campos <carlosgc@gnome.org>
Sun, 15 May 2005 18:36:10 +0000 (18:36 +0000)
committerCarlos Garcia Campos <carlosgc@src.gnome.org>
Sun, 15 May 2005 18:36:10 +0000 (18:36 +0000)
2005-05-15  Carlos Garcia Campos <carlosgc@gnome.org>
* shell/ev-sidebar.c: make the drop down menu as width as the toggle
button.

ChangeLog
shell/ev-sidebar.c

index 538389fd522cbe5e3561534a5f7f4e969d5341f5..c6a56c9bdcca9965fa022c0f486367980cfd369f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2005-05-15  Carlos Garcia Campos <carlosgc@gnome.org>
+
+       * shell/ev-sidebar.c: make the drop down menu as width as the toggle
+       button.
+
 2005-05-12  Marco Pesenti Gritti  <mpg@redhat.com>
 
        * AUTHORS:
index 3ba66ada46932cd8744b2b9c4a52ae6bf74deb7e..f687d10f4dc379ac38e061021b4370fbb37a654a 100644 (file)
@@ -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);