From afa82f9627fa9d9f58699cdb44389a483617048e Mon Sep 17 00:00:00 2001 From: Carlos Garcia Campos Date: Sun, 15 May 2005 18:36:10 +0000 Subject: [PATCH] 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. --- ChangeLog | 5 +++++ shell/ev-sidebar.c | 9 +++++++++ 2 files changed, 14 insertions(+) diff --git a/ChangeLog b/ChangeLog index 538389fd..c6a56c9b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2005-05-15 Carlos Garcia Campos + + * shell/ev-sidebar.c: make the drop down menu as width as the toggle + button. + 2005-05-12 Marco Pesenti Gritti * AUTHORS: diff --git a/shell/ev-sidebar.c b/shell/ev-sidebar.c index 3ba66ada..f687d10f 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); -- 2.43.5