diff options
author | David Robillard <d@drobilla.net> | 2008-09-19 19:32:10 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2008-09-19 19:32:10 +0000 |
commit | b87ca000f86fdfc210c08056ae8e921236ea96c7 (patch) | |
tree | 54b47b7e50baecca54c6392067ff9a3e05f6f25d /gtk2_ardour/time_axis_view_item.cc | |
parent | 7aea02083a207402405cc4869b892dd63da191b6 (diff) |
Merge all the (disconcertingly missing) track/region/etc height changes from 2.0.
Fix track y positioning and initial region size/location.
Fix automation click-to-add-points (i.e. points actually show up where you click).
Fancy whiz-bang dynamic resize 2.0 professional edition support for MIDI/CC/Automation tracks/regions.
git-svn-id: svn://localhost/ardour2/branches/3.0@3769 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/time_axis_view_item.cc')
-rw-r--r-- | gtk2_ardour/time_axis_view_item.cc | 27 |
1 files changed, 12 insertions, 15 deletions
diff --git a/gtk2_ardour/time_axis_view_item.cc b/gtk2_ardour/time_axis_view_item.cc index 6f25f1e6b5..0ee000a141 100644 --- a/gtk2_ardour/time_axis_view_item.cc +++ b/gtk2_ardour/time_axis_view_item.cc @@ -572,16 +572,15 @@ TimeAxisViewItem::set_name_text(const ustring& new_name) } /** - * Set the y position and height of this item. + * Set the height of this item * - * @param y the new y position * @param h the new height */ void -TimeAxisViewItem::set_y_position_and_height (double y, double h) +TimeAxisViewItem::set_height (double height) { if (name_highlight) { - if (h < NAME_HIGHLIGHT_THRESH) { + if (height < NAME_HIGHLIGHT_THRESH) { name_highlight->hide(); if (name_text) { name_text->hide(); @@ -593,20 +592,20 @@ TimeAxisViewItem::set_y_position_and_height (double y, double h) } } - if (h > NAME_HIGHLIGHT_SIZE) { - name_highlight->property_y1() = (double) y + h + 1 - NAME_HIGHLIGHT_SIZE; - name_highlight->property_y2() = (double) y + h; + if (height > NAME_HIGHLIGHT_SIZE) { + name_highlight->property_y1() = (double) height+1 - NAME_HIGHLIGHT_SIZE; + name_highlight->property_y2() = (double) height; } else { /* it gets hidden now anyway */ - name_highlight->property_y1() = (double) y; - name_highlight->property_y2() = (double) y + h; + name_highlight->property_y1() = (double) 1.0; + name_highlight->property_y2() = (double) height; } } if (name_text) { - name_text->property_y() = y + h + 1 - NAME_Y_OFFSET; - if (h < NAME_HIGHLIGHT_THRESH) { + name_text->property_y() = height+1 - NAME_Y_OFFSET; + if (height < NAME_HIGHLIGHT_THRESH) { name_text->property_fill_color_rgba() = fill_color; } else { @@ -615,12 +614,10 @@ TimeAxisViewItem::set_y_position_and_height (double y, double h) } if (frame) { - frame->property_y1() = y; - frame->property_y2() = y + h + 1; + frame->property_y2() = height+1; } - vestigial_frame->property_y1() = y; - vestigial_frame->property_y2() = y + h + 1; + vestigial_frame->property_y2() = height+1; } /** |