diff options
author | David Robillard <d@drobilla.net> | 2011-08-31 15:07:44 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2011-08-31 15:07:44 +0000 |
commit | 6436e4e541d0a08859229a15f9cd3a6d3e3ede1f (patch) | |
tree | e5ff2da00e766db85e648150fad6fd4323de443e /gtk2_ardour | |
parent | fc90be6059831a7e4789f951ac5283693de2e787 (diff) |
Fix editor track heights (m/s/etc. buttons being cut off at Normal height).
git-svn-id: svn://localhost/ardour2/branches/3.0@10037 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour')
-rw-r--r-- | gtk2_ardour/time_axis_view.cc | 20 | ||||
-rw-r--r-- | gtk2_ardour/time_axis_view.h | 2 |
2 files changed, 11 insertions, 11 deletions
diff --git a/gtk2_ardour/time_axis_view.cc b/gtk2_ardour/time_axis_view.cc index 0902d213f5..14cbecd808 100644 --- a/gtk2_ardour/time_axis_view.cc +++ b/gtk2_ardour/time_axis_view.cc @@ -67,8 +67,8 @@ using namespace ArdourCanvas; using Gtkmm2ext::Keyboard; const double trim_handle_size = 6.0; /* pixels */ -uint32_t TimeAxisView::extra_height; -uint32_t TimeAxisView::small_height; +uint32_t TimeAxisView::button_height = 0; +uint32_t TimeAxisView::extra_height = 0; int const TimeAxisView::_max_order = 512; PBD::Signal1<void,TimeAxisView*> TimeAxisView::CatchDeletion; @@ -1092,7 +1092,8 @@ TimeAxisView::compute_heights () Button* buttons[5]; const int border_width = 2; - extra_height = (2 * border_width); + const int separator_height = 2; + extra_height = (2 * border_width) + separator_height; window.add (one_row_table); @@ -1117,8 +1118,7 @@ TimeAxisView::compute_heights () Gtk::Requisition req(one_row_table.size_request ()); // height required to show 1 row of buttons - - small_height = req.height + (2 * border_width); + button_height = req.height; } void @@ -1241,15 +1241,15 @@ TimeAxisView::preset_height (Height h) { switch (h) { case HeightLargest: - return extra_height + 48 + 250; + return (button_height * 2) + extra_height + 250; case HeightLarger: - return extra_height + 48 + 150; + return (button_height * 2) + extra_height + 150; case HeightLarge: - return extra_height + 48 + 50; + return (button_height * 2) + extra_height + 50; case HeightNormal: - return extra_height + 48; + return (button_height * 2) + extra_height; case HeightSmall: - return small_height; + return button_height + extra_height; } /* NOTREACHED */ diff --git a/gtk2_ardour/time_axis_view.h b/gtk2_ardour/time_axis_view.h index efdb2606ed..59315df055 100644 --- a/gtk2_ardour/time_axis_view.h +++ b/gtk2_ardour/time_axis_view.h @@ -310,8 +310,8 @@ private: ArdourCanvas::Group* _ghost_group; void compute_heights (); + static uint32_t button_height; static uint32_t extra_height; - static uint32_t small_height; static int const _max_order; |