diff src/layout_util.c @ 2813:e9e8e8b2afce

Move menu/toolbar to top of window Moving the menu/toolbar to the top of the window eliminates the problem of these items being partially obscured when the tools pane is reduced to a small width.
author Colin Clark <colin.clark@cclark.uk>
date Sun, 12 Aug 2018 17:29:35 +0100
parents 865f7eab9b6d
children e6f95baec8b5
line wrap: on
line diff
--- a/src/layout_util.c	Sat Aug 11 19:48:17 2018 +0100
+++ b/src/layout_util.c	Sun Aug 12 17:29:35 2018 +0100
@@ -2703,6 +2703,24 @@
 	return lw->toolbar[type];
 }
 
+GtkWidget *layout_actions_menu_tool_bar(LayoutWindow *lw)
+{
+	GtkWidget *menu_bar;
+	GtkWidget *toolbar;
+
+	if (lw->menu_tool_bar) return lw->menu_tool_bar;
+
+	menu_bar = layout_actions_menu_bar(lw);
+	toolbar = layout_actions_toolbar(lw, TOOLBAR_MAIN);
+	lw->menu_tool_bar = gtk_vbox_new(FALSE, 0);
+
+	gtk_box_pack_start(GTK_BOX(lw->menu_tool_bar), menu_bar, FALSE, FALSE, 0);
+	gtk_box_pack_start(GTK_BOX(lw->menu_tool_bar), toolbar, FALSE, FALSE, 0);
+
+	g_object_ref(lw->menu_tool_bar);
+	return lw->menu_tool_bar;
+}
+
 void layout_toolbar_clear(LayoutWindow *lw, ToolbarType type)
 {
 	if (lw->toolbar_merge_id[type])