From afa82f9627fa9d9f58699cdb44389a483617048e Mon Sep 17 00:00:00 2001 From: Carlos Garcia Campos Date: Sun, 15 May 2005 18:36:10 +0000 Subject: make the drop down menu as width as the toggle button. 2005-05-15 Carlos Garcia Campos * shell/ev-sidebar.c: make the drop down menu as width as the toggle button. --- (limited to 'shell/ev-sidebar.c') 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); -- cgit v0.9.1