diff options
| author | Carl Hetherington <cth@carlh.net> | 2013-02-18 22:01:43 +0000 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2013-02-18 22:01:43 +0000 |
| commit | 23fb3c45e14ff9c4e8e77c633b216f3167c636e0 (patch) | |
| tree | 2cd33b4e6d46741621e39b390e741e58e2440563 /src | |
| parent | 779d19a17e5f49dc4419442cf4b296e039f1a8fc (diff) | |
Grotty hack to sort out the layout of the top half of the frame when the editor resizes.
Diffstat (limited to 'src')
| -rw-r--r-- | src/tools/dvdomatic.cc | 24 |
1 files changed, 19 insertions, 5 deletions
diff --git a/src/tools/dvdomatic.cc b/src/tools/dvdomatic.cc index 9efe3f545..1b76132f6 100644 --- a/src/tools/dvdomatic.cc +++ b/src/tools/dvdomatic.cc @@ -221,12 +221,12 @@ public: film_viewer = new FilmViewer (film, panel); JobManagerView* job_manager_view = new JobManagerView (panel); - wxSizer* top_sizer = new wxBoxSizer (wxHORIZONTAL); - top_sizer->Add (film_editor, 0, wxALL, 6); - top_sizer->Add (film_viewer, 1, wxEXPAND | wxALL, 6); + _top_sizer = new wxBoxSizer (wxHORIZONTAL); + _top_sizer->Add (film_editor, 0, wxALL, 6); + _top_sizer->Add (film_viewer, 1, wxEXPAND | wxALL, 6); wxBoxSizer* main_sizer = new wxBoxSizer (wxVERTICAL); - main_sizer->Add (top_sizer, 2, wxEXPAND | wxALL, 6); + main_sizer->Add (_top_sizer, 2, wxEXPAND | wxALL, 6); main_sizer->Add (job_manager_view, 1, wxEXPAND | wxALL, 6); panel->SetSizer (main_sizer); @@ -241,12 +241,24 @@ public: } else { file_changed (""); } - + set_film (); + + film_editor->Connect (wxID_ANY, wxEVT_SIZE, wxSizeEventHandler (Frame::film_editor_sized), 0, this); } private: + void film_editor_sized (wxSizeEvent &) + { + static bool in_layout = false; + if (!in_layout) { + in_layout = true; + _top_sizer->Layout (); + in_layout = false; + } + } + void menu_opened (wxMenuEvent& ev) { if (ev.GetMenu() != jobs_menu) { @@ -400,6 +412,8 @@ private: info.SetWebSite (wxT ("http://carlh.net/software/dvdomatic")); wxAboutBox (info); } + + wxSizer* _top_sizer; }; #if wxMINOR_VERSION == 9 |
