X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=libs%2Fgtkmm2ext%2Fslider_controller.cc;h=e3c47f332ea00c06c690ed35b2e83b905ce33798;hb=d9df0ea6e50f4caa23b4c9e67236e17e303ef89e;hp=3e2b42f409361011e3e275729b323dc335cf4e25;hpb=532f6aad4ac79ca15d69deccd18fca90e444c437;p=ardour.git diff --git a/libs/gtkmm2ext/slider_controller.cc b/libs/gtkmm2ext/slider_controller.cc index 3e2b42f409..e3c47f332e 100644 --- a/libs/gtkmm2ext/slider_controller.cc +++ b/libs/gtkmm2ext/slider_controller.cc @@ -28,14 +28,9 @@ using namespace Gtkmm2ext; using namespace PBD; -SliderController::SliderController (Glib::RefPtr image, - Gtk::Adjustment *adj, - Controllable& c, - bool with_numeric) - - : PixFader (image, *adj), - binding_proxy (c), - spin (*adj, 0, 2) +SliderController::SliderController (Gtk::Adjustment *adj, int orientation, int fader_length, int fader_girth) + : PixFader (*adj, orientation, fader_length, fader_girth) + , spin (*adj, 0, 2) { spin.set_name ("SliderControllerValue"); spin.set_size_request (70,-1); // should be based on font size somehow @@ -55,15 +50,13 @@ SliderController::on_button_press_event (GdkEventButton *ev) if (binding_proxy.button_press_handler (ev)) { return true; } + return PixFader::on_button_press_event (ev); } -VSliderController::VSliderController (Glib::RefPtr image, - Gtk::Adjustment *adj, - Controllable& control, - bool with_numeric) +VSliderController::VSliderController (Gtk::Adjustment *adj, int fader_length, int fader_girth, bool with_numeric) - : SliderController (image, adj, control, with_numeric) + : SliderController (adj, VERT, fader_length, fader_girth) { if (with_numeric) { spin_frame.add (spin); @@ -74,12 +67,10 @@ VSliderController::VSliderController (Glib::RefPtr image, } } -HSliderController::HSliderController (Glib::RefPtr image, - Gtk::Adjustment *adj, - Controllable& control, +HSliderController::HSliderController (Gtk::Adjustment *adj, int fader_length, int fader_girth, bool with_numeric) - : SliderController (image, adj, control, with_numeric) + : SliderController (adj, HORIZ, fader_length, fader_girth) { if (with_numeric) { spin_frame.add (spin);