X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=gtk2_ardour%2Fcontrol_point.cc;h=9b588d1babadc97b530dcee308dbf5c7783a44a4;hb=152935e736eaf06f85bc7f5cb27337a62d95edd4;hp=8e05ad0a0b1b57367489db43177a66012c6b86a9;hpb=aaea166135ace01709f7e0be64f40be80f4107ec;p=ardour.git diff --git a/gtk2_ardour/control_point.cc b/gtk2_ardour/control_point.cc index 8e05ad0a0b..9b588d1bab 100644 --- a/gtk2_ardour/control_point.cc +++ b/gtk2_ardour/control_point.cc @@ -44,16 +44,13 @@ ControlPoint::ControlPoint (AutomationLine& al) _size = 4.0; _item = new ArdourCanvas::Rectangle (&_line.canvas_group()); - _item->property_draw() = true; - _item->set_fill (false); - _item->set_fill_color (ARDOUR_UI::config()->canvasvar_ControlPointFill.get()); - _item->set_outline_color (ARDOUR_UI::config()->canvasvar_ControlPointOutline.get()); - _item->set_outline_width (1); + _item->set_fill (true); + _item->set_fill_color (ARDOUR_UI::config()->get_canvasvar_ControlPointFill()); + _item->set_outline_color (ARDOUR_UI::config()->get_canvasvar_ControlPointOutline()); _item->set_data ("control_point", this); _item->Event.connect (sigc::mem_fun (this, &ControlPoint::event_handler)); hide (); - set_visible (false); } ControlPoint::ControlPoint (const ControlPoint& other, bool /*dummy_arg_to_force_special_copy_constructor*/) @@ -72,14 +69,12 @@ ControlPoint::ControlPoint (const ControlPoint& other, bool /*dummy_arg_to_force _size = other._size; _item = new ArdourCanvas::Rectangle (&_line.canvas_group()); - _item->set_fill (false); - _item->set_outline_color (ARDOUR_UI::config()->canvasvar_ControlPointOutline.get()); - _item->set_outline_width (1); + _item->set_fill (true); + _item->set_outline_color (ARDOUR_UI::config()->get_canvasvar_ControlPointOutline()); /* NOTE: no event handling in copied ControlPoints */ hide (); - set_visible (false); } ControlPoint::~ControlPoint () @@ -107,29 +102,15 @@ ControlPoint::show() _item->show(); } -void -ControlPoint::set_visible (bool yn) -{ - _item->property_draw() = (gboolean) yn; -} - bool ControlPoint::visible () const { - return _item->property_draw (); + return _item->visible (); } void ControlPoint::reset (double x, double y, AutomationList::iterator mi, uint32_t vi, ShapeType shape) { - /* If this is too big, libart will confuse itself and segfault after it casts the bounding box - of this automation line to ints. Sigh. - */ - - if (x > INT32_MAX) { - x = INT32_MAX; - } - _model = mi; _view_index = vi; move_to (x, y, shape); @@ -141,13 +122,13 @@ ControlPoint::set_color () uint32_t color = 0; if (_selected) { - color = ARDOUR_UI::config()->canvasvar_ControlPointSelected.get(); + color = ARDOUR_UI::config()->get_canvasvar_ControlPointSelected(); } else { - color = ARDOUR_UI::config()->canvasvar_ControlPointOutline.get(); + color = ARDOUR_UI::config()->get_canvasvar_ControlPointOutline(); } _item->set_outline_color (color); - _item->set_fill_color (ARDOUR_UI::config()->canvasvar_ControlPointFill.get()); + _item->set_fill_color (ARDOUR_UI::config()->get_canvasvar_ControlPointFill()); } void