diff options
author | David Robillard <d@drobilla.net> | 2011-10-01 04:55:00 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2011-10-01 04:55:00 +0000 |
commit | a55d08e0d1af511e5b4e2d9a8c3be1822fff840c (patch) | |
tree | a0a7a5c93c60c89236fc1dc46f77b6ca3ef3a963 /src | |
parent | 5757ab645cae1d844d6d457ab2dea4a12d21a4e7 (diff) | |
download | ingen-a55d08e0d1af511e5b4e2d9a8c3be1822fff840c.tar.gz ingen-a55d08e0d1af511e5b4e2d9a8c3be1822fff840c.tar.bz2 ingen-a55d08e0d1af511e5b4e2d9a8c3be1822fff840c.zip |
Saner default size for initial show of documentation pane.
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@3516 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/PatchWindow.cpp | 8 | ||||
-rw-r--r-- | src/gui/PatchWindow.hpp | 3 | ||||
-rw-r--r-- | src/gui/ingen_gui.ui | 2 |
3 files changed, 12 insertions, 1 deletions
diff --git a/src/gui/PatchWindow.cpp b/src/gui/PatchWindow.cpp index d03d665e..d0de48a4 100644 --- a/src/gui/PatchWindow.cpp +++ b/src/gui/PatchWindow.cpp @@ -67,6 +67,7 @@ PatchWindow::PatchWindow(BaseObjectType* cobject, , _x(0) , _y(0) , _breadcrumbs(NULL) + , _has_shown_documentation(false) { property_visible() = false; @@ -104,6 +105,7 @@ PatchWindow::PatchWindow(BaseObjectType* cobject, xml->get_widget("patch_view_messages_window_menuitem", _menu_view_messages_window); xml->get_widget("patch_view_patch_tree_window_menuitem", _menu_view_patch_tree_window); xml->get_widget("patch_help_about_menuitem", _menu_help_about); + xml->get_widget("patch_documentation_paned", _doc_paned); xml->get_widget("patch_documentation_viewport", _doc_viewport); xml->get_widget("patch_documentation_textview", _doc_textview); @@ -321,6 +323,12 @@ PatchWindow::show_documentation(const std::string& doc, bool html) _doc_viewport->add(*view); _doc_viewport->show_all(); #endif + if (!_has_shown_documentation) { + int width, height; + get_size(width, height); + _doc_paned->set_position(width / 1.61803399); + } + _has_shown_documentation = true; } void diff --git a/src/gui/PatchWindow.hpp b/src/gui/PatchWindow.hpp index 4766cb99..41dd91f8 100644 --- a/src/gui/PatchWindow.hpp +++ b/src/gui/PatchWindow.hpp @@ -154,6 +154,7 @@ private: BreadCrumbs* _breadcrumbs; Gtk::Statusbar* _status_bar; + Gtk::HPaned* _doc_paned; Gtk::Viewport* _doc_viewport; Gtk::TextView* _doc_textview; @@ -162,6 +163,8 @@ private: /** Invisible bin used to store breadcrumbs when not shown by a view */ Gtk::Alignment _breadcrumb_bin; + + bool _has_shown_documentation; }; } // namespace GUI diff --git a/src/gui/ingen_gui.ui b/src/gui/ingen_gui.ui index 66d7cc19..ca2d10e3 100644 --- a/src/gui/ingen_gui.ui +++ b/src/gui/ingen_gui.ui @@ -2170,7 +2170,7 @@ Contributors: </packing> </child> <child> - <object class="GtkHPaned" id="hpaned1"> + <object class="GtkHPaned" id="patch_documentation_paned"> <property name="visible">True</property> <property name="can_focus">True</property> <child> |