TimeAxisViewItem::set_constant_heights ()
{
NAME_FONT = get_font_for_style (X_("TimeAxisViewItemName"));
TimeAxisViewItem::set_constant_heights ()
{
NAME_FONT = get_font_for_style (X_("TimeAxisViewItemName"));
, PBD::ScopedConnectionList()
, trackview (other.trackview)
, _recregion (other._recregion)
, _automation (other._automation)
, PBD::ScopedConnectionList()
, trackview (other.trackview)
, _recregion (other._recregion)
, _automation (other._automation)
- init (
- other.item_name, other.samples_per_unit, c, other.frame_position,
- other.item_duration, other.visibility, other.wide_enough_for_name, other.high_enough_for_name
- );
+ init (other.item_name, other.samples_per_unit, c, other.frame_position,
+ other.item_duration, other.visibility, other.wide_enough_for_name, other.high_enough_for_name);
if (visibility & ShowFrame) {
frame = new ArdourCanvas::SimpleRect (*group, 0.0, 1.0, trackview.editor().frame_to_pixel(duration), trackview.current_height());
if (visibility & ShowFrame) {
frame = new ArdourCanvas::SimpleRect (*group, 0.0, 1.0, trackview.editor().frame_to_pixel(duration), trackview.current_height());
if (_recregion) {
frame->property_outline_color_rgba() = ARDOUR_UI::config()->canvasvar_RecordingRect.get();
} else {
frame->property_outline_color_rgba() = ARDOUR_UI::config()->canvasvar_TimeAxisFrame.get();
}
if (_recregion) {
frame->property_outline_color_rgba() = ARDOUR_UI::config()->canvasvar_RecordingRect.get();
} else {
frame->property_outline_color_rgba() = ARDOUR_UI::config()->canvasvar_TimeAxisFrame.get();
}
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());
} 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());
}
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());
} 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());
}
name_highlight->set_data ("timeaxisviewitem", this);
name_highlight->property_outline_what() = 0x4;
/* we should really use a canvas color property here */
name_highlight->set_data ("timeaxisviewitem", this);
name_highlight->property_outline_what() = 0x4;
/* we should really use a canvas color property here */
- frame_handle_start = new ArdourCanvas::SimpleRect (*group, 0.0, TimeAxisViewItem::GRAB_HANDLE_LENGTH, 5.0, trackview.current_height());
+ double top = TimeAxisViewItem::GRAB_HANDLE_TOP;
+ double width = TimeAxisViewItem::GRAB_HANDLE_WIDTH;
+
+ frame_handle_start = new ArdourCanvas::SimpleRect (*group, 0.0, top, width, trackview.current_height());
- frame_handle_end = new ArdourCanvas::SimpleRect (*group, 0.0, TimeAxisViewItem::GRAB_HANDLE_LENGTH, 5.0, trackview.current_height());
+ frame_handle_end = new ArdourCanvas::SimpleRect (*group, 0.0, top, width, trackview.current_height());
set_duration (item_duration, this);
set_position (start, this);
set_duration (item_duration, this);
set_position (start, this);
- Config->ParameterChanged.connect (*this, invalidator (*this), ui_bind (&TimeAxisViewItem::parameter_changed, this, _1), gui_context ());
+ Config->ParameterChanged.connect (*this, invalidator (*this), boost::bind (&TimeAxisViewItem::parameter_changed, this, _1), gui_context ());
- warning << string_compose (_("new duration %1 frames is out of bounds for %2"), get_item_name(), dur)
+ warning << string_compose (
+ P_("new duration %1 frame is out of bounds for %2", "new duration of %1 frames is out of bounds for %2", dur),
+ get_item_name(), dur)
name_pixbuf->property_pixbuf() = pixbuf_from_string(new_name, NAME_FONT, name_pixbuf_width, NAME_HEIGHT, Gdk::Color ("#000000"));
}
name_pixbuf->property_pixbuf() = pixbuf_from_string(new_name, NAME_FONT, name_pixbuf_width, NAME_HEIGHT, Gdk::Color ("#000000"));
}
if (_selected) {
f = ARDOUR_UI::config()->canvasvar_SelectedFrameBase.get();
if (fill_opacity) {
f = UINT_RGBA_CHANGE_A (f, fill_opacity);
if (_selected) {
f = ARDOUR_UI::config()->canvasvar_SelectedFrameBase.get();
if (fill_opacity) {
f = UINT_RGBA_CHANGE_A (f, fill_opacity);
if (high_enough_for_name && !Config->get_color_regions_using_track_color()) {
f = ARDOUR_UI::config()->canvasvar_FrameBase.get();
} else {
if (high_enough_for_name && !Config->get_color_regions_using_track_color()) {
f = ARDOUR_UI::config()->canvasvar_FrameBase.get();
} else {
+
+ if (!_recregion) {
+ if (_selected) {
+ f = ARDOUR_UI::config()->canvasvar_SelectedTimeAxisFrame.get();
+ } else {
+ f = ARDOUR_UI::config()->canvasvar_TimeAxisFrame.get();
+ }
+
+ if (!rect_visible) {
+ f = UINT_RGBA_CHANGE_A (f, 64);
+ }
+
+ frame->property_outline_color_rgba() = f;
+ }
- if (pixel_width < (2*TimeAxisViewItem::GRAB_HANDLE_LENGTH)) {
+ if (pixel_width < (3 * TimeAxisViewItem::GRAB_HANDLE_WIDTH)) {
+ /*
+ * there's less than GRAB_HANDLE_WIDTH of the region between
+ * the right-hand end of frame_handle_start and the left-hand
+ * end of frame_handle_end, so disable the handles
+ */