[latexila/latexila-2-6] Allow the menu bar to shrink below its minimum size
- From: SÃbastien Wilmet <swilmet src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [latexila/latexila-2-6] Allow the menu bar to shrink below its minimum size
- Date: Mon, 28 Jan 2013 17:59:59 +0000 (UTC)
commit 0228ea9ed31297a8309a4ef933437c65cdf2941b
Author: SÃbastien Wilmet <swilmet gnome org>
Date: Mon Jan 28 17:56:49 2013 +0100
Allow the menu bar to shrink below its minimum size
It's now possible to use LaTeXila and Evince side-by-side with a small
screen.
src/main_window.vala | 15 +++++++++++++--
1 files changed, 13 insertions(+), 2 deletions(-)
---
diff --git a/src/main_window.vala b/src/main_window.vala
index 33000b8..ac7f28f 100644
--- a/src/main_window.vala
+++ b/src/main_window.vala
@@ -169,8 +169,19 @@ public class MainWindow : Window
/* Menu */
Widget menu = _ui_manager.get_widget ("/MainMenu");
- menu.show_all ();
- main_vgrid.add (menu);
+
+ // Allow the menu to shrink below its minimum width
+ Paned menu_paned = new Paned (Orientation.HORIZONTAL);
+ Viewport viewport = new Viewport (null, null);
+ viewport.shadow_type = ShadowType.NONE;
+ Gdk.RGBA transparent = Gdk.RGBA ();
+ transparent.alpha = 0.0;
+ viewport.override_background_color (StateFlags.NORMAL, transparent);
+ viewport.add (menu);
+ menu_paned.add1 (viewport);
+ menu_paned.show_all ();
+
+ main_vgrid.add (menu_paned);
// Force to show icons in the menu.
// In the LaTeX and Math menu, icons are needed.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]