From cafc767ad5c5fbb7bf993b298223eba6714ecd78 Mon Sep 17 00:00:00 2001 From: Alex Valavanis Date: Fri, 8 Mar 2013 00:43:48 +0000 Subject: Switch to orientable Scale widgets in Gtkmm 3 (bzr r12179) --- src/ui/widget/tolerance-slider.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/ui/widget/tolerance-slider.cpp') diff --git a/src/ui/widget/tolerance-slider.cpp b/src/ui/widget/tolerance-slider.cpp index 16558f0ee..f92a08d0a 100644 --- a/src/ui/widget/tolerance-slider.cpp +++ b/src/ui/widget/tolerance-slider.cpp @@ -73,8 +73,15 @@ void ToleranceSlider::init (const Glib::ustring& label1, const Glib::ustring& la theLabel1->set_use_underline(); theLabel1->set_alignment(0, 0.5); // align the label with the checkbox text above by indenting 22 px. - _hbox->pack_start(*theLabel1, Gtk::PACK_EXPAND_WIDGET, 22); + _hbox->pack_start(*theLabel1, Gtk::PACK_EXPAND_WIDGET, 22); + +#if WITH_GTKMM_3_0 + _hscale = manage(new Gtk::Scale(Gtk::ORIENTATION_HORIZONTAL)); + _hscale->set_range(1.0, 51.0); +#else _hscale = manage (new Gtk::HScale (1.0, 51, 1.0)); +#endif + theLabel1->set_mnemonic_widget (*_hscale); _hscale->set_draw_value (true); _hscale->set_value_pos (Gtk::POS_RIGHT); -- cgit v1.2.3