summaryrefslogtreecommitdiff
path: root/gtk2_ardour/control_point.cc
diff options
context:
space:
mode:
Diffstat (limited to 'gtk2_ardour/control_point.cc')
-rw-r--r--gtk2_ardour/control_point.cc38
1 files changed, 16 insertions, 22 deletions
diff --git a/gtk2_ardour/control_point.cc b/gtk2_ardour/control_point.cc
index 781f9f3b31..f40a809a4a 100644
--- a/gtk2_ardour/control_point.cc
+++ b/gtk2_ardour/control_point.cc
@@ -45,7 +45,7 @@ ControlPoint::ControlPoint (AutomationLine& al)
_item = new Canvas::SimpleRect (_line.canvas_group());
_item->property_draw() = true;
_item->property_fill() = false;
- _item->property_fill_color_rgba() = ARDOUR_UI::config()->canvasvar_ControlPointFill.get();
+ _item->property_fill_color_rgba() = ARDOUR_UI::config()->canvasvar_ControlPointFill.get();
_item->property_outline_color_rgba() = ARDOUR_UI::config()->canvasvar_ControlPointOutline.get();
_item->property_outline_pixels() = 1;
_item->set_data ("control_point", this);
@@ -111,6 +111,12 @@ ControlPoint::set_visible (bool yn)
_item->property_draw() = (gboolean) yn;
}
+bool
+ControlPoint::visible () const
+{
+ return _item->property_draw ();
+}
+
void
ControlPoint::reset (double x, double y, AutomationList::iterator mi, uint32_t vi, ShapeType shape)
{
@@ -120,31 +126,14 @@ ControlPoint::reset (double x, double y, AutomationList::iterator mi, uint32_t v
}
void
-ControlPoint::show_color (bool entered, bool hide_too)
+ControlPoint::set_color ()
{
uint32_t color = 0;
- if (entered) {
- if (_selected) {
- color = ARDOUR_UI::config()->canvasvar_EnteredControlPointSelected.get();
- set_visible(true);
- } else {
- color = ARDOUR_UI::config()->canvasvar_EnteredControlPointOutline.get();
- if (hide_too) {
- set_visible(false);
- }
- }
-
+ if (_selected) {
+ color = ARDOUR_UI::config()->canvasvar_ControlPointSelected.get();
} else {
- if (_selected) {
- color = ARDOUR_UI::config()->canvasvar_ControlPointSelected.get();
- set_visible(true);
- } else {
- color = ARDOUR_UI::config()->canvasvar_ControlPointOutline.get();
- if (hide_too) {
- set_visible(false);
- }
- }
+ color = ARDOUR_UI::config()->canvasvar_ControlPointOutline.get();
}
_item->property_outline_color_rgba() = color;
@@ -190,3 +179,8 @@ ControlPoint::move_to (double x, double y, ShapeType shape)
_shape = shape;
}
+void
+ControlPoint::i2w (double& x, double& y) const
+{
+ _item->i2w (x, y);
+}