summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2012-12-20 00:16:14 +0000
committerCarl Hetherington <cth@carlh.net>2012-12-20 00:16:14 +0000
commit7faadda40c0ab027b992789329a558fbaf3ec0cc (patch)
treeac6ed485f4e422cf2a9819bed356b58d2dfef697 /src
parent2f56f38ce56b36f20d59593f56981e7ed330c484 (diff)
Improve resizing on going from still to video content.
Diffstat (limited to 'src')
-rw-r--r--src/wx/film_editor.cc3
-rw-r--r--src/wx/film_viewer.cc9
-rw-r--r--src/wx/film_viewer.h3
3 files changed, 10 insertions, 5 deletions
diff --git a/src/wx/film_editor.cc b/src/wx/film_editor.cc
index c3f719172..c90122aff 100644
--- a/src/wx/film_editor.cc
+++ b/src/wx/film_editor.cc
@@ -846,6 +846,8 @@ FilmEditor::setup_visibility ()
(*i)->Show (c == STILL);
}
+ _notebook->InvalidateBestSize ();
+
_film_sizer->Layout ();
_film_sizer->SetSizeHints (_film_panel);
_video_sizer->Layout ();
@@ -856,6 +858,7 @@ FilmEditor::setup_visibility ()
_subtitle_sizer->SetSizeHints (_subtitle_panel);
_notebook->Fit ();
+ Fit ();
}
void
diff --git a/src/wx/film_viewer.cc b/src/wx/film_viewer.cc
index eb58899f5..3e0e678cf 100644
--- a/src/wx/film_viewer.cc
+++ b/src/wx/film_viewer.cc
@@ -61,16 +61,16 @@ FilmViewer::FilmViewer (shared_ptr<Film> f, wxWindow* p)
_panel->SetBackgroundStyle (wxBG_STYLE_PAINT);
#endif
- wxBoxSizer* v_sizer = new wxBoxSizer (wxVERTICAL);
- SetSizer (v_sizer);
+ _v_sizer = new wxBoxSizer (wxVERTICAL);
+ SetSizer (_v_sizer);
- v_sizer->Add (_panel, 1, wxEXPAND);
+ _v_sizer->Add (_panel, 1, wxEXPAND);
wxBoxSizer* h_sizer = new wxBoxSizer (wxHORIZONTAL);
h_sizer->Add (_play_button, 0, wxEXPAND);
h_sizer->Add (_slider, 1, wxEXPAND);
- v_sizer->Add (h_sizer, 0, wxEXPAND);
+ _v_sizer->Add (h_sizer, 0, wxEXPAND);
_panel->Connect (wxID_ANY, wxEVT_PAINT, wxPaintEventHandler (FilmViewer::paint_panel), 0, this);
_panel->Connect (wxID_ANY, wxEVT_SIZE, wxSizeEventHandler (FilmViewer::panel_sized), 0, this);
@@ -110,6 +110,7 @@ FilmViewer::film_changed (Film::Property p)
_panel->Refresh ();
_slider->Show (_film->content_type() == VIDEO);
_play_button->Show (_film->content_type() == VIDEO);
+ _v_sizer->Layout ();
break;
}
case Film::WITH_SUBTITLES:
diff --git a/src/wx/film_viewer.h b/src/wx/film_viewer.h
index 783207811..77f014aab 100644
--- a/src/wx/film_viewer.h
+++ b/src/wx/film_viewer.h
@@ -58,7 +58,8 @@ private:
void active_jobs_changed (bool);
boost::shared_ptr<Film> _film;
-
+
+ wxBoxSizer* _v_sizer;
wxPanel* _panel;
wxSlider* _slider;
wxToggleButton* _play_button;