diff options
author | Carl Hetherington <carl@carlh.net> | 2010-07-16 20:03:16 +0000 |
---|---|---|
committer | Carl Hetherington <carl@carlh.net> | 2010-07-16 20:03:16 +0000 |
commit | da67628bcf19c47d6531e212e8a650d82b1abd4c (patch) | |
tree | 8e2e89129d65cab24816ae87440758f488eadbc6 /gtk2_ardour/time_axis_view_item.cc | |
parent | eb4d9be40c15dd1fc7069eefef684048b98d2226 (diff) |
Patch from Lincoln (#3319) to make the range selection box not display trim handles but make it trimmable along the whole edge. Also clean up record box rendering.
git-svn-id: svn://localhost/ardour2/branches/3.0@7431 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 | 30 |
1 files changed, 11 insertions, 19 deletions
diff --git a/gtk2_ardour/time_axis_view_item.cc b/gtk2_ardour/time_axis_view_item.cc index e4f7a860e7..5af9819bf8 100644 --- a/gtk2_ardour/time_axis_view_item.cc +++ b/gtk2_ardour/time_axis_view_item.cc @@ -131,8 +131,7 @@ TimeAxisViewItem::TimeAxisViewItem (const TimeAxisViewItem& other) void TimeAxisViewItem::init ( - const string& it_name, double spu, Gdk::Color const & base_color, nframes64_t start, nframes64_t duration, Visibility vis, bool wide, bool high - ) + const string& it_name, double spu, Gdk::Color const & base_color, nframes64_t start, nframes64_t duration, Visibility vis, bool wide, bool high) { item_name = it_name; samples_per_unit = spu; @@ -164,38 +163,31 @@ TimeAxisViewItem::init ( if (visibility & ShowFrame) { frame = new ArdourCanvas::SimpleRect (*group, 0.0, 1.0, trackview.editor().frame_to_pixel(duration), trackview.current_height()); + frame->property_outline_pixels() = 1; frame->property_outline_what() = 0xF; - frame->property_outline_color_rgba() = ARDOUR_UI::config()->canvasvar_TimeAxisFrame.get(); - - /* by default draw all 4 edges */ - - uint32_t outline_what = 0x1|0x2|0x4|0x8; - - if (visibility & HideFrameLeft) { - outline_what &= ~(0x1); - } - - if (visibility & HideFrameRight) { - outline_what &= ~(0x2); + + if(_recregion){ + frame->property_outline_color_rgba() = ARDOUR_UI::config()->canvasvar_RecordingRect.get(); } - - if (visibility & HideFrameTB) { - outline_what &= ~(0x4 | 0x8); + else { + frame->property_outline_color_rgba() = ARDOUR_UI::config()->canvasvar_TimeAxisFrame.get(); } - - frame->property_outline_what() = outline_what; + + frame->property_outline_what() = 0x1|0x2|0x4|0x8; } else { frame = 0; } if (visibility & ShowNameHighlight) { + if (visibility & FullWidthNameHighlight) { name_highlight = new ArdourCanvas::SimpleRect (*group, 0.0, trackview.editor().frame_to_pixel(item_duration), trackview.current_height() - TimeAxisViewItem::NAME_HIGHLIGHT_SIZE, trackview.current_height() - 1); } else { name_highlight = new ArdourCanvas::SimpleRect (*group, 1.0, trackview.editor().frame_to_pixel(item_duration) - 1, trackview.current_height() - TimeAxisViewItem::NAME_HIGHLIGHT_SIZE, trackview.current_height() - 1); } + name_highlight->set_data ("timeaxisviewitem", this); } else { |