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.cc18
1 files changed, 16 insertions, 2 deletions
diff --git a/gtk2_ardour/time_axis_view_item.cc b/gtk2_ardour/time_axis_view_item.cc
index ec0af7fb3b..d3f720c253 100644
--- a/gtk2_ardour/time_axis_view_item.cc
+++ b/gtk2_ardour/time_axis_view_item.cc
@@ -239,6 +239,8 @@ TimeAxisViewItem::init (const string& it_name, double spu, Gdk::Color& base_colo
set_duration (item_duration, this) ;
set_position (start, this) ;
+
+ ColorsChanged.connect (mem_fun (*this, &TimeAxisViewItem::color_handler));
}
/**
@@ -552,9 +554,19 @@ TimeAxisViewItem::set_name_text(const ustring& new_name)
return;
}
+ _name = new_name;
+
last_item_width = trackview.editor.frame_to_pixel(item_duration);
name_pixbuf_width = pixel_width (new_name, *NAME_FONT) + 2;
- name_pixbuf->property_pixbuf() = pixbuf_from_ustring(new_name, NAME_FONT, name_pixbuf_width, NAME_HEIGHT);
+ name_pixbuf->property_pixbuf() = pixbuf_from_ustring(new_name, NAME_FONT,
+ ARDOUR_UI::config()->canvasvar_TimeAxisViewItemName.get(),
+ name_pixbuf_width, NAME_HEIGHT);
+}
+
+void
+TimeAxisViewItem::color_handler ()
+{
+ set_name_text (_name);
}
/**
@@ -919,7 +931,9 @@ TimeAxisViewItem::reset_name_width (double pix_width)
name_pixbuf->show();
}
- name_pixbuf->property_pixbuf() = pixbuf_from_ustring(item_name, NAME_FONT, pb_width, NAME_HEIGHT);
+ name_pixbuf->property_pixbuf() = pixbuf_from_ustring(item_name, NAME_FONT,
+ ARDOUR_UI::config()->canvasvar_TimeAxisViewItemName.get(),
+ pb_width, NAME_HEIGHT);
}