diff options
author | Doug McLain <doug@nostar.net> | 2007-03-08 16:41:38 +0000 |
---|---|---|
committer | Doug McLain <doug@nostar.net> | 2007-03-08 16:41:38 +0000 |
commit | 934c2ec367aade8219f4d9b4597d17847a3a97bb (patch) | |
tree | e921772fc1dc9785f0bbb1dfbb7f70c63ab9728a | |
parent | d778a2494aec9194041185da49fd63cfbe0d2b12 (diff) |
Add playhead and editcursor to ardour.colors and remove hard coded colors
git-svn-id: svn://localhost/ardour2/trunk@1561 d708f5d6-7413-0410-9779-e7cbd77b26cf
-rw-r--r-- | gtk2_ardour/ardour.colors | 3 | ||||
-rw-r--r-- | gtk2_ardour/colors.h | 3 | ||||
-rw-r--r-- | gtk2_ardour/editor.h | 2 | ||||
-rw-r--r-- | gtk2_ardour/editor_canvas.cc | 6 | ||||
-rw-r--r-- | gtk2_ardour/editor_cursors.cc | 3 |
5 files changed, 12 insertions, 5 deletions
diff --git a/gtk2_ardour/ardour.colors b/gtk2_ardour/ardour.colors index ca2baa1363..cb8b103e3c 100644 --- a/gtk2_ardour/ardour.colors +++ b/gtk2_ardour/ardour.colors @@ -98,3 +98,6 @@ cTrimHandleLockedStart 0.92 0.06 0.06 0.16 cTrimHandleLockedEnd 0.92 0.06 0.06 0.16 cTrimHandleStart 0.10 0.00 1.00 0.27 cTrimHandleEnd 0.10 0.00 1.00 0.27 +cEditCursor 0.20 0.20 1.00 11.00 +cPlayHead 1.00 0.00 0.00 1.00 + diff --git a/gtk2_ardour/colors.h b/gtk2_ardour/colors.h index e70c14340e..a64ba1c8b4 100644 --- a/gtk2_ardour/colors.h +++ b/gtk2_ardour/colors.h @@ -101,3 +101,6 @@ COLORID(cTrimHandleLockedStart) COLORID(cTrimHandleLockedEnd) COLORID(cTrimHandleStart) COLORID(cTrimHandleEnd) +COLORID(cEditCursor) +COLORID(cPlayHead) + diff --git a/gtk2_ardour/editor.h b/gtk2_ardour/editor.h index b4f7a89bb4..4b2db1f366 100644 --- a/gtk2_ardour/editor.h +++ b/gtk2_ardour/editor.h @@ -610,7 +610,7 @@ class Editor : public PublicEditor nframes_t current_frame; double length; - Cursor (Editor&, const string& color, bool (Editor::*)(GdkEvent*,ArdourCanvas::Item*)); + Cursor (Editor&, bool (Editor::*)(GdkEvent*,ArdourCanvas::Item*)); ~Cursor (); void set_position (nframes_t); diff --git a/gtk2_ardour/editor_canvas.cc b/gtk2_ardour/editor_canvas.cc index 674cc5eab2..4538a3d0ee 100644 --- a/gtk2_ardour/editor_canvas.cc +++ b/gtk2_ardour/editor_canvas.cc @@ -263,8 +263,10 @@ Editor::initialize_canvas () double time_width = FLT_MAX/frames_per_unit; time_canvas.set_scroll_region(0.0, 0.0, time_width, time_height); - edit_cursor = new Cursor (*this, "blue", &Editor::canvas_edit_cursor_event); - playhead_cursor = new Cursor (*this, "red", &Editor::canvas_playhead_cursor_event); + edit_cursor = new Cursor (*this, &Editor::canvas_edit_cursor_event); + edit_cursor->canvas_item.property_fill_color_rgba() = color_map[cEditCursor]; + playhead_cursor = new Cursor (*this, &Editor::canvas_playhead_cursor_event); + playhead_cursor->canvas_item.property_fill_color_rgba() = color_map[cPlayHead]; initial_ruler_update_required = true; track_canvas.signal_size_allocate().connect (mem_fun(*this, &Editor::track_canvas_allocate)); diff --git a/gtk2_ardour/editor_cursors.cc b/gtk2_ardour/editor_cursors.cc index 3c4e1c5dba..239d27d4f9 100644 --- a/gtk2_ardour/editor_cursors.cc +++ b/gtk2_ardour/editor_cursors.cc @@ -30,7 +30,7 @@ using namespace ARDOUR; using namespace PBD; using namespace Gtk; -Editor::Cursor::Cursor (Editor& ed, const string& color, bool (Editor::*callbck)(GdkEvent*,ArdourCanvas::Item*)) +Editor::Cursor::Cursor (Editor& ed, bool (Editor::*callbck)(GdkEvent*,ArdourCanvas::Item*)) : editor (ed), canvas_item (*editor.cursor_group), length(1.0) @@ -42,7 +42,6 @@ Editor::Cursor::Cursor (Editor& ed, const string& color, bool (Editor::*callbck) points.push_back(Gnome::Art::Point(1.0, 0.0)); canvas_item.property_points() = points; - canvas_item.property_fill_color() = color; //.c_str()); canvas_item.property_width_pixels() = 1; canvas_item.property_first_arrowhead() = TRUE; canvas_item.property_last_arrowhead() = TRUE; |