From 5be883cd9875e53da3b582c148c9d6dcd3a4825a Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jan=20Dj=C3=A4rv?= Date: Thu, 8 Oct 2009 15:18:15 +0000 Subject: [PATCH] gtkutil.c (create_menus): Call gtk_widget_set_size_request for menu bar with a small width so it doesn't enlarge the frame. --- src/ChangeLog | 5 +++++ src/gtkutil.c | 10 +++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index 88126a28c4e..7f04a578467 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2009-10-08 Jan Djärv + + * gtkutil.c (create_menus): Call gtk_widget_set_size_request for + menu bar with a small width so it doesn't enlarge the frame. + 2009-10-08 Juanma Barranquero * fontset.c (Fset_fontset_font): Fix typos in error messages. diff --git a/src/gtkutil.c b/src/gtkutil.c index 5072094d6ce..9da2c7e9cbe 100644 --- a/src/gtkutil.c +++ b/src/gtkutil.c @@ -2194,7 +2194,15 @@ create_menus (data, f, select_cb, deactivate_cb, highlight_cb, G_CALLBACK (menuitem_highlight_callback), NULL); } - else wmenu = gtk_menu_bar_new (); + else + { + wmenu = gtk_menu_bar_new (); + // Set width of menu bar to a small value so it doesn't enlarge + // a small initial frame size. The width will be set to the + // width of the frame later on when it is added to a container. + // height -1: Natural height. + gtk_widget_set_size_request (wmenu, 1, -1); + } /* Put cl_data on the top menu for easier access. */ cl_data = make_cl_data (cl_data, f, highlight_cb); -- 2.39.2