summaryrefslogtreecommitdiff
path: root/gtk2_ardour/time_axis_view_item.cc
diff options
context:
space:
mode:
Diffstat (limited to 'gtk2_ardour/time_axis_view_item.cc')
-rw-r--r--gtk2_ardour/time_axis_view_item.cc38
1 files changed, 19 insertions, 19 deletions
diff --git a/gtk2_ardour/time_axis_view_item.cc b/gtk2_ardour/time_axis_view_item.cc
index 5cd88e8a97..9ddfb30fd4 100644
--- a/gtk2_ardour/time_axis_view_item.cc
+++ b/gtk2_ardour/time_axis_view_item.cc
@@ -63,18 +63,18 @@ void
TimeAxisViewItem::set_constant_heights ()
{
NAME_FONT = get_font_for_style (X_("TimeAxisViewItemName"));
-
+
Gtk::Window win;
Gtk::Label foo;
win.add (foo);
-
+
Glib::RefPtr<Pango::Layout> layout = foo.create_pango_layout (X_("Hg")); /* ascender + descender */
int width = 0;
int height = 0;
-
+
layout->set_font_description (*NAME_FONT);
Gtkmm2ext::get_ink_pixel_size (layout, width, height);
-
+
NAME_HEIGHT = height;
NAME_Y_OFFSET = height + 3;
NAME_HIGHLIGHT_SIZE = height + 2;
@@ -170,16 +170,16 @@ 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;
-
+
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();
}
-
+
frame->property_outline_what() = 0x1|0x2|0x4|0x8;
} else {
@@ -187,13 +187,13 @@ TimeAxisViewItem::init (
}
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());
} 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 */
@@ -712,14 +712,14 @@ TimeAxisViewItem::set_frame_color()
if (!frame) {
return;
}
-
+
if (_selected) {
f = ARDOUR_UI::config()->canvasvar_SelectedFrameBase.get();
if (fill_opacity) {
f = UINT_RGBA_CHANGE_A (f, fill_opacity);
- }
+ }
if (!rect_visible) {
f = UINT_RGBA_CHANGE_A (f, 0);
@@ -730,7 +730,7 @@ TimeAxisViewItem::set_frame_color()
if (_recregion) {
f = ARDOUR_UI::config()->canvasvar_RecordingRect.get();
} else {
-
+
if (high_enough_for_name && !Config->get_color_regions_using_track_color()) {
f = ARDOUR_UI::config()->canvasvar_FrameBase.get();
} else {
@@ -755,11 +755,11 @@ TimeAxisViewItem::set_frame_color()
} else {
f = ARDOUR_UI::config()->canvasvar_TimeAxisFrame.get();
}
-
+
if (!rect_visible) {
f = UINT_RGBA_CHANGE_A (f, 64);
}
-
+
frame->property_outline_color_rgba() = f;
}
}
@@ -851,7 +851,7 @@ TimeAxisViewItem::reset_width_dependent_items (double pixel_width)
}
high_enough_for_name = true;
}
-
+
name_highlight->property_x2() = pixel_width;
}
@@ -896,16 +896,16 @@ TimeAxisViewItem::reset_name_width (double /*pixel_width*/)
if (pixbuf_holds_full_name && (it_width >= pb_width + NAME_X_OFFSET)) {
/*
- we've previously had the full name length showing
+ we've previously had the full name length showing
and its still showing.
*/
return;
}
-
+
if (pb_width > it_width - NAME_X_OFFSET) {
pb_width = it_width - NAME_X_OFFSET;
}
-
+
if (it_width <= NAME_X_OFFSET) {
wide_enough_for_name = false;
} else {
@@ -950,7 +950,7 @@ TimeAxisViewItem::update_name_pixbuf_visibility ()
if (!name_pixbuf) {
return;
}
-
+
if (wide_enough_for_name && high_enough_for_name) {
name_pixbuf->show ();
} else {