summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2012-07-17 13:02:57 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2012-07-17 13:02:57 +0000
commit0f9dab42d9e6be26164c5c8b31c49f806934d1ed (patch)
tree15d741879a5bcff7f1fd0c938d69e02edf2cabfb
parent3c252e9321dccf9b653b6b9ab4a7ffe5cda31b79 (diff)
add translucent "shade" to playhead cursor (may remove this in the future)
git-svn-id: svn://localhost/ardour2/branches/3.0@13048 d708f5d6-7413-0410-9779-e7cbd77b26cf
-rw-r--r--gtk2_ardour/automation_line.cc2
-rw-r--r--gtk2_ardour/editor_cursors.cc10
-rw-r--r--gtk2_ardour/editor_cursors.h3
3 files changed, 13 insertions, 2 deletions
diff --git a/gtk2_ardour/automation_line.cc b/gtk2_ardour/automation_line.cc
index 6586aed966..8691e1e2ab 100644
--- a/gtk2_ardour/automation_line.cc
+++ b/gtk2_ardour/automation_line.cc
@@ -93,7 +93,7 @@ AutomationLine::AutomationLine (const string& name, TimeAxisView& tv, ArdourCanv
group->property_y() = 0.0;
line = new ArdourCanvas::Line (*group);
- line->property_width_pixels() = (guint)1;
+ line->property_width_pixels() = (guint)3;
line->set_data ("line", this);
line->signal_event().connect (sigc::mem_fun (*this, &AutomationLine::event_handler));
diff --git a/gtk2_ardour/editor_cursors.cc b/gtk2_ardour/editor_cursors.cc
index ccacda210f..0d88c1cdbc 100644
--- a/gtk2_ardour/editor_cursors.cc
+++ b/gtk2_ardour/editor_cursors.cc
@@ -22,6 +22,8 @@
#include <libgnomecanvas/libgnomecanvas.h>
+#include "gtkmm2ext/rgb_macros.h"
+
#include "utils.h"
#include "editor_cursors.h"
#include "editor.h"
@@ -32,6 +34,7 @@ using namespace Gtk;
EditorCursor::EditorCursor (Editor& ed, bool (Editor::*callbck)(GdkEvent*,ArdourCanvas::Item*))
: editor (ed),
+ shade (*editor.cursor_group),
canvas_item (*editor.cursor_group),
length(1.0)
{
@@ -46,6 +49,10 @@ EditorCursor::EditorCursor (Editor& ed, bool (Editor::*callbck)(GdkEvent*,Ardour
canvas_item.property_arrow_shape_b() = 0.0;
canvas_item.property_arrow_shape_c() = 9.0;
+ shade.property_points() = points;
+ shade.property_width_pixels() = 7;
+ shade.property_fill_color_rgba() = RGBA_TO_UINT (255, 255, 255, 75);
+
canvas_item.set_data ("cursor", this);
canvas_item.signal_event().connect (sigc::bind (sigc::mem_fun (ed, callbck), &canvas_item));
current_frame = 1; /* force redraw at 0 */
@@ -69,6 +76,7 @@ EditorCursor::set_position (framepos_t frame)
points.back().set_x (new_pos);
canvas_item.property_points() = points;
+ shade.property_points() = points;
}
current_frame = frame;
}
@@ -79,6 +87,7 @@ EditorCursor::set_length (double units)
length = units;
points.back().set_y (points.front().get_y() + length);
canvas_item.property_points() = points;
+ shade.property_points() = points;
}
void
@@ -87,4 +96,5 @@ EditorCursor::set_y_axis (double position)
points.front().set_y (position);
points.back().set_y (position + length);
canvas_item.property_points() = points;
+ shade.property_points() = points;
}
diff --git a/gtk2_ardour/editor_cursors.h b/gtk2_ardour/editor_cursors.h
index 2e2c654bd1..2b5c46b4a0 100644
--- a/gtk2_ardour/editor_cursors.h
+++ b/gtk2_ardour/editor_cursors.h
@@ -25,7 +25,8 @@ class EditorCursor {
public:
Editor& editor;
ArdourCanvas::Points points;
- ArdourCanvas::Line canvas_item;
+ ArdourCanvas::Line shade;
+ ArdourCanvas::Line canvas_item;
framepos_t current_frame;
double length;