diff options
author | Robin Gareus <robin@gareus.org> | 2019-04-10 21:03:08 +0200 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2019-04-10 21:50:55 +0200 |
commit | f5bc64d00e898ae02e3964f530155d8130584967 (patch) | |
tree | 1584e473013e010b6e7c74ae9bee161ad952c7f8 /gtk2_ardour/audio_region_view.cc | |
parent | d465a2b0124468a085e0a78898279f167095fdc1 (diff) |
Add option to leave vertical gap below audio regions
This is a backport from Mixbus, to leave are 4 "open" pixels
at the bottom of the track so one can see the grid-lines between tracks.
This is useful with low region-transparency. grid-lines behind
opaque regions are not visible.
Diffstat (limited to 'gtk2_ardour/audio_region_view.cc')
-rw-r--r-- | gtk2_ardour/audio_region_view.cc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/gtk2_ardour/audio_region_view.cc b/gtk2_ardour/audio_region_view.cc index 419d885c51..0d744874e9 100644 --- a/gtk2_ardour/audio_region_view.cc +++ b/gtk2_ardour/audio_region_view.cc @@ -538,6 +538,14 @@ AudioRegionView::setup_fade_handle_positions() void AudioRegionView::set_height (gdouble height) { + uint32_t gap = UIConfiguration::instance().get_vertical_region_gap (); + float ui_scale = UIConfiguration::instance().get_ui_scale (); + if (gap > 0 && ui_scale > 0) { + gap = ceil (gap * ui_scale); + } + + height = std::max (3.0, height - gap); + if (height == _height) { return; } |