diff options
author | Carl Hetherington <carl@carlh.net> | 2011-02-17 22:35:42 +0000 |
---|---|---|
committer | Carl Hetherington <carl@carlh.net> | 2011-02-17 22:35:42 +0000 |
commit | 6117b74bb9c8d9f84ac962be48ca382db90ed983 (patch) | |
tree | 5937eab072c2fd91052788242cf1ee911c570a3e | |
parent | 2ffc0cbe25287e504fc7e8ac3a07800405affeb4 (diff) |
Make sense of parameter to tav_zoom_step match up with coarser as used for temporal zoom.
git-svn-id: svn://localhost/ardour2/branches/3.0@8896 d708f5d6-7413-0410-9779-e7cbd77b26cf
-rw-r--r-- | gtk2_ardour/editor.cc | 4 | ||||
-rw-r--r-- | gtk2_ardour/editor_canvas_events.cc | 4 | ||||
-rw-r--r-- | gtk2_ardour/time_axis_view.cc | 34 | ||||
-rw-r--r-- | gtk2_ardour/time_axis_view.h | 8 |
4 files changed, 25 insertions, 25 deletions
diff --git a/gtk2_ardour/editor.cc b/gtk2_ardour/editor.cc index 4a18d0c813..ad494aabec 100644 --- a/gtk2_ardour/editor.cc +++ b/gtk2_ardour/editor.cc @@ -2795,12 +2795,12 @@ Editor::setup_toolbar () tav_expand_button.set_name ("TrackHeightButton"); tav_expand_button.set_size_request(-1,20); tav_expand_button.add (*(manage (new Image (::get_icon("tav_exp"))))); - tav_expand_button.signal_clicked().connect (sigc::bind (sigc::mem_fun(*this, &Editor::tav_zoom_step), true)); + tav_expand_button.signal_clicked().connect (sigc::bind (sigc::mem_fun(*this, &Editor::tav_zoom_step), false)); tav_shrink_button.set_name ("TrackHeightButton"); tav_shrink_button.set_size_request(-1,20); tav_shrink_button.add (*(manage (new Image (::get_icon("tav_shrink"))))); - tav_shrink_button.signal_clicked().connect (sigc::bind (sigc::mem_fun(*this, &Editor::tav_zoom_step), false)); + tav_shrink_button.signal_clicked().connect (sigc::bind (sigc::mem_fun(*this, &Editor::tav_zoom_step), true)); _zoom_box.pack_start (tav_shrink_button); _zoom_box.pack_start (tav_expand_button); diff --git a/gtk2_ardour/editor_canvas_events.cc b/gtk2_ardour/editor_canvas_events.cc index 5028f47789..fe94cac084 100644 --- a/gtk2_ardour/editor_canvas_events.cc +++ b/gtk2_ardour/editor_canvas_events.cc @@ -83,7 +83,7 @@ Editor::track_canvas_scroll (GdkEventScroll* ev) } } last_track_height_step_timestamp = get_microseconds(); - current_stepping_trackview->step_height (true); + current_stepping_trackview->step_height (false); return true; } else { scroll_tracks_up_line (); @@ -108,7 +108,7 @@ Editor::track_canvas_scroll (GdkEventScroll* ev) } } last_track_height_step_timestamp = get_microseconds(); - current_stepping_trackview->step_height (false); + current_stepping_trackview->step_height (true); return true; } else { scroll_tracks_down_line (); diff --git a/gtk2_ardour/time_axis_view.cc b/gtk2_ardour/time_axis_view.cc index 7c47d5a5e0..3cf1377c3b 100644 --- a/gtk2_ardour/time_axis_view.cc +++ b/gtk2_ardour/time_axis_view.cc @@ -301,7 +301,7 @@ TimeAxisView::controls_ebox_scroll (GdkEventScroll* ev) switch (ev->direction) { case GDK_SCROLL_UP: if (Keyboard::modifier_state_equals (ev->state, Keyboard::TertiaryModifier)) { - step_height (true); + step_height (false); return true; } else if (Keyboard::no_modifiers_active (ev->state)) { _editor.scroll_tracks_up_line(); @@ -311,7 +311,7 @@ TimeAxisView::controls_ebox_scroll (GdkEventScroll* ev) case GDK_SCROLL_DOWN: if (Keyboard::modifier_state_equals (ev->state, Keyboard::TertiaryModifier)) { - step_height (false); + step_height (true); return true; } else if (Keyboard::no_modifiers_active (ev->state)) { _editor.scroll_tracks_down_line(); @@ -382,21 +382,16 @@ TimeAxisView::hide () Hiding (); } +/** Steps through the defined heights for this TrackView. + * @param coarser true if stepping should decrease in size, otherwise false. + */ void -TimeAxisView::step_height (bool bigger) +TimeAxisView::step_height (bool coarser) { static const uint32_t step = 25; - if (bigger) { - if (height == preset_height(HeightSmall)) { - set_height_enum (HeightSmaller); - } else if (height == preset_height(HeightSmaller)) { - set_height_enum (HeightNormal); - } else { - set_height (height + step); - } - - } else { + if (coarser) { + if (height == preset_height (HeightSmall)) { return; } @@ -407,7 +402,18 @@ TimeAxisView::step_height (bool bigger) set_height_enum (HeightSmaller); } else { set_height (height - step); - } + } + + } else { + + if (height == preset_height(HeightSmall)) { + set_height_enum (HeightSmaller); + } else if (height == preset_height(HeightSmaller)) { + set_height_enum (HeightNormal); + } else { + set_height (height + step); + } + } } diff --git a/gtk2_ardour/time_axis_view.h b/gtk2_ardour/time_axis_view.h index 55553fafe9..16c527d2be 100644 --- a/gtk2_ardour/time_axis_view.h +++ b/gtk2_ardour/time_axis_view.h @@ -154,13 +154,7 @@ class TimeAxisView : public virtual AxisView, public PBD::Stateful std::pair<TimeAxisView*, ARDOUR::layer_t> covers_y_position (double); - /** - * Steps through the defined heights for this TrackView. - * Sets bigger to true to step up in size, set to fals eot step smaller. - * - * @param bigger true if stepping should increase in size, false otherwise - */ - virtual void step_height (bool bigger); + virtual void step_height (bool); virtual ARDOUR::RouteGroup* route_group() const { return 0; } virtual boost::shared_ptr<ARDOUR::Playlist> playlist() const { return boost::shared_ptr<ARDOUR::Playlist> (); } |