From: Carl Hetherington Date: Wed, 4 Jul 2018 09:58:01 +0000 (+0100) Subject: Toolbar and scrolling tweaks. X-Git-Tag: v2.13.33~11 X-Git-Url: https://git.carlh.net/gitweb/?a=commitdiff_plain;h=792ffde2a810284504a241df70ac3e407a5e05c6;p=dcpomatic.git Toolbar and scrolling tweaks. --- diff --git a/src/wx/timeline.cc b/src/wx/timeline.cc index 8524db603..017d27dfb 100644 --- a/src/wx/timeline.cc +++ b/src/wx/timeline.cc @@ -96,7 +96,13 @@ Timeline::Timeline (wxWindow* parent, ContentPanel* cp, shared_ptr film) _main_canvas->Bind (wxEVT_RIGHT_DOWN, boost::bind (&Timeline::right_down, this, _1)); _main_canvas->Bind (wxEVT_MOTION, boost::bind (&Timeline::mouse_moved, this, _1)); _main_canvas->Bind (wxEVT_SIZE, boost::bind (&Timeline::resized, this)); - _main_canvas->Bind (wxEVT_SCROLLWIN_THUMBTRACK, boost::bind (&Timeline::scrolled, this, _1)); + _main_canvas->Bind (wxEVT_SCROLLWIN_TOP, boost::bind (&Timeline::scrolled, this, _1)); + _main_canvas->Bind (wxEVT_SCROLLWIN_BOTTOM, boost::bind (&Timeline::scrolled, this, _1)); + _main_canvas->Bind (wxEVT_SCROLLWIN_LINEUP, boost::bind (&Timeline::scrolled, this, _1)); + _main_canvas->Bind (wxEVT_SCROLLWIN_LINEDOWN, boost::bind (&Timeline::scrolled, this, _1)); + _main_canvas->Bind (wxEVT_SCROLLWIN_PAGEUP, boost::bind (&Timeline::scrolled, this, _1)); + _main_canvas->Bind (wxEVT_SCROLLWIN_PAGEDOWN, boost::bind (&Timeline::scrolled, this, _1)); + _main_canvas->Bind (wxEVT_SCROLLWIN_THUMBTRACK, boost::bind (&Timeline::scrolled, this, _1)); film_changed (Film::CONTENT); diff --git a/src/wx/timeline_dialog.cc b/src/wx/timeline_dialog.cc index b487bdb81..6f3fbae37 100644 --- a/src/wx/timeline_dialog.cc +++ b/src/wx/timeline_dialog.cc @@ -61,14 +61,14 @@ TimelineDialog::TimelineDialog (ContentPanel* cp, shared_ptr film) wxBitmap snap (bitmap_path("snap"), wxBITMAP_TYPE_PNG); wxBitmap sequence (bitmap_path("sequence"), wxBITMAP_TYPE_PNG); - cout << "select OK: " << select.IsOk() << "\n"; - - _toolbar = new wxToolBar (this, wxID_ANY); + _toolbar = new wxToolBar (this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTB_HORIZONTAL | wxTB_TEXT); + _toolbar->SetMargins (4, 4); _toolbar->AddRadioTool ((int) Timeline::SELECT, _("Select"), select, wxNullBitmap, _("Select and move content")); _toolbar->AddRadioTool ((int) Timeline::ZOOM, _("Zoom"), zoom, wxNullBitmap, _("Zoom in / out")); _toolbar->AddTool ((int) Timeline::ZOOM_ALL, _("Zoom all"), zoom_all, _("Zoom out to whole film")); _toolbar->AddCheckTool ((int) Timeline::SNAP, _("Snap"), snap, wxNullBitmap, _("Snap")); _toolbar->AddCheckTool ((int) Timeline::SEQUENCE, _("Sequence"), sequence, wxNullBitmap, _("Keep video and subtitles in sequence")); + _toolbar->Realize (); _toolbar->Bind (wxEVT_TOOL, bind (&TimelineDialog::tool_clicked, this, _1));