diff options
| author | Carl Hetherington <cth@carlh.net> | 2018-07-04 00:51:31 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2018-07-04 00:51:31 +0100 |
| commit | aaaa51f6d9eda60ab3b3d182c6d2a7a5bda375aa (patch) | |
| tree | 9a8a1ec74936fb47c4700d34da6e63cd82fe0f84 /src/wx/timeline_dialog.cc | |
| parent | beddaeab9011e745dcac9732f4e8de3f91bd81a5 (diff) | |
Add zoom-all button.
Diffstat (limited to 'src/wx/timeline_dialog.cc')
| -rw-r--r-- | src/wx/timeline_dialog.cc | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/src/wx/timeline_dialog.cc b/src/wx/timeline_dialog.cc index dd28f9c23..34706d620 100644 --- a/src/wx/timeline_dialog.cc +++ b/src/wx/timeline_dialog.cc @@ -54,20 +54,23 @@ TimelineDialog::TimelineDialog (ContentPanel* cp, shared_ptr<Film> film) wxBoxSizer* sizer = new wxBoxSizer (wxVERTICAL); wxBoxSizer* controls = new wxBoxSizer (wxHORIZONTAL); - _snap = new wxCheckBox (this, wxID_ANY, _("Snap")); - controls->Add (_snap); - _sequence = new wxCheckBox (this, wxID_ANY, _("Keep video and subtitles in sequence")); - controls->Add (_sequence, 1, wxLEFT, 12); - wxToolBar* toolbar = new wxToolBar (this, wxID_ANY); #ifdef DCPOMATIC_LINUX wxBitmap select (wxString::Format (wxT ("%s/select.png"), std_to_wx (shared_path().string())), wxBITMAP_TYPE_PNG); wxBitmap zoom (wxString::Format (wxT ("%s/zoom.png"), std_to_wx (shared_path().string())), wxBITMAP_TYPE_PNG); + wxBitmap zoom_all (wxString::Format (wxT ("%s/zoom_all.png"), std_to_wx (shared_path().string())), wxBITMAP_TYPE_PNG); #endif + wxToolBar* toolbar = new wxToolBar (this, wxID_ANY); toolbar->AddRadioTool ((int) Timeline::SELECT, _("Select"), select); toolbar->AddRadioTool ((int) Timeline::ZOOM, _("Zoom"), zoom); + toolbar->AddTool ((int) Timeline::ZOOM_ALL, _("Zoom to whole project"), zoom_all); controls->Add (toolbar); - toolbar->Bind (wxEVT_TOOL, bind (&TimelineDialog::tool_changed, this, _1)); + toolbar->Bind (wxEVT_TOOL, bind (&TimelineDialog::tool_clicked, this, _1)); + + _snap = new wxCheckBox (this, wxID_ANY, _("Snap")); + controls->Add (_snap); + _sequence = new wxCheckBox (this, wxID_ANY, _("Keep video and subtitles in sequence")); + controls->Add (_sequence, 1, wxLEFT, 12); sizer->Add (controls, 0, wxALL, 12); sizer->Add (&_timeline, 1, wxEXPAND | wxALL, 12); @@ -128,7 +131,7 @@ TimelineDialog::set_selection (ContentList selection) } void -TimelineDialog::tool_changed (wxCommandEvent& ev) +TimelineDialog::tool_clicked (wxCommandEvent& ev) { - _timeline.set_tool ((Timeline::Tool) ev.GetId()); + _timeline.tool_clicked ((Timeline::Tool) ev.GetId()); } |
