mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-29 01:47:43 +01:00
MCP: F1-7 jump to a given view; F8 closes any currently open dialog; in zoom mode, up/down alter vertical track height of all tracks; option-up/down alters selected track heights
git-svn-id: svn://localhost/ardour2/branches/3.0@11858 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
0431309f89
commit
bef3ea1adc
11 changed files with 309 additions and 190 deletions
|
|
@ -1278,11 +1278,17 @@ Editor::scroll_tracks_up_line ()
|
|||
void
|
||||
Editor::tav_zoom_step (bool coarser)
|
||||
{
|
||||
ENSURE_GUI_THREAD (*this, &Editor::temporal_zoom_step, coarser)
|
||||
|
||||
_routes->suspend_redisplay ();
|
||||
|
||||
for (TrackViewList::iterator i = track_views.begin(); i != track_views.end(); ++i) {
|
||||
TrackViewList* ts;
|
||||
|
||||
if (selection->tracks.empty()) {
|
||||
ts = &track_views;
|
||||
} else {
|
||||
ts = &selection->tracks;
|
||||
}
|
||||
|
||||
for (TrackViewList::iterator i = ts->begin(); i != ts->end(); ++i) {
|
||||
TimeAxisView *tv = (static_cast<TimeAxisView*>(*i));
|
||||
tv->step_height (coarser);
|
||||
}
|
||||
|
|
@ -1290,6 +1296,38 @@ Editor::tav_zoom_step (bool coarser)
|
|||
_routes->resume_redisplay ();
|
||||
}
|
||||
|
||||
void
|
||||
Editor::tav_zoom_smooth (bool coarser, bool force_all)
|
||||
{
|
||||
_routes->suspend_redisplay ();
|
||||
|
||||
TrackViewList* ts;
|
||||
|
||||
if (selection->tracks.empty() || force_all) {
|
||||
ts = &track_views;
|
||||
} else {
|
||||
ts = &selection->tracks;
|
||||
}
|
||||
|
||||
for (TrackViewList::iterator i = ts->begin(); i != ts->end(); ++i) {
|
||||
TimeAxisView *tv = (static_cast<TimeAxisView*>(*i));
|
||||
uint32_t h = tv->current_height ();
|
||||
|
||||
if (coarser) {
|
||||
if (h > 5) {
|
||||
h -= 5; // pixels
|
||||
if (h >= TimeAxisView::preset_height (HeightSmall)) {
|
||||
tv->set_height (h);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
tv->set_height (h + 5);
|
||||
}
|
||||
}
|
||||
|
||||
_routes->resume_redisplay ();
|
||||
}
|
||||
|
||||
void
|
||||
Editor::temporal_zoom_step (bool coarser)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue