diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2010-06-02 15:54:51 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2010-06-02 15:54:51 +0000 |
commit | f9a47cff2b7f07b769fe674f395e413fc40501fe (patch) | |
tree | 303233544e36627ecf6dd3de7e5a53f6418e1416 /gtk2_ardour/time_axis_view_item.cc | |
parent | 519eaabe8b7995b986b05c050b814cd09cbd4859 (diff) |
make marker labels and regionview name text (now drawn with pixbufs) be color-adjustable just like all other canvas items2.8.9
git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@7212 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 | 18 |
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); } |