diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2008-04-30 02:37:05 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2008-04-30 02:37:05 +0000 |
commit | 53199152fdb49df703c2d87a778bc7e37663499d (patch) | |
tree | e7f7d285c197b6f587aedf8536dfcc4d48d33948 /gtk2_ardour/pan_automation_time_axis.cc | |
parent | 4ec4eb24638add2add1496a051cb5b57517b32c8 (diff) |
first pass of dynamically resizable track heights
git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@3298 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/pan_automation_time_axis.cc')
-rw-r--r-- | gtk2_ardour/pan_automation_time_axis.cc | 25 |
1 files changed, 10 insertions, 15 deletions
diff --git a/gtk2_ardour/pan_automation_time_axis.cc b/gtk2_ardour/pan_automation_time_axis.cc index c008a10ff0..e444e5dfea 100644 --- a/gtk2_ardour/pan_automation_time_axis.cc +++ b/gtk2_ardour/pan_automation_time_axis.cc @@ -114,7 +114,7 @@ PanAutomationTimeAxisView::add_line (AutomationLine& line) multiline_selector.set_active(0); } - if (lines.size() + 1 > 1 && (height_style != Small && height_style != Smaller)) { + if (lines.size() + 1 > 1 && (height > hSmall)) { multiline_selector.show(); } else { multiline_selector.hide(); @@ -125,21 +125,16 @@ PanAutomationTimeAxisView::add_line (AutomationLine& line) } void -PanAutomationTimeAxisView::set_height (TimeAxisView::TrackHeight th) +PanAutomationTimeAxisView::set_height (uint32_t h) { - AutomationTimeAxisView::set_height(th); - - switch (th) { - case Largest: - case Large: - case Larger: - case Normal: - if (lines.size() > 1) { - multiline_selector.show(); - break; - } - default: - multiline_selector.hide(); + AutomationTimeAxisView::set_height(h); + + if (h >= hNormal) { + if (lines.size() > 1) { + multiline_selector.show(); + } + } else { + multiline_selector.hide(); } } |