summaryrefslogtreecommitdiffstats
path: root/src/extension/param/float.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/extension/param/float.cpp')
-rw-r--r--src/extension/param/float.cpp34
1 files changed, 17 insertions, 17 deletions
diff --git a/src/extension/param/float.cpp b/src/extension/param/float.cpp
index 2f1c77d4e..464938f03 100644
--- a/src/extension/param/float.cpp
+++ b/src/extension/param/float.cpp
@@ -10,10 +10,15 @@
# include "config.h"
#endif
+#if GLIBMM_DISABLE_DEPRECATED && HAVE_GLIBMM_THREADS_H
+#include <glibmm/threads.h>
+#endif
+
#include <gtkmm/adjustment.h>
#include <gtkmm/box.h>
#include <gtkmm/scale.h>
#include "ui/widget/spinbutton.h"
+#include "ui/widget/spin-scale.h"
#include "xml/node.h"
#include "extension/extension.h"
@@ -176,14 +181,6 @@ Gtk::Widget * ParamFloat::get_widget(SPDocument * doc, Inkscape::XML::Node * nod
Gtk::HBox * hbox = Gtk::manage(new Gtk::HBox(false, 4));
-#if WITH_GTKMM_2_22
- Gtk::Label * label = Gtk::manage(new Gtk::Label(_(_text), Gtk::ALIGN_START));
-#else
- Gtk::Label * label = Gtk::manage(new Gtk::Label(_(_text), Gtk::ALIGN_LEFT));
-#endif
- label->show();
- hbox->pack_start(*label, true, true, _indent);
-
#if WITH_GTKMM_3_0
ParamFloatAdjustment * pfa = new ParamFloatAdjustment(this, doc, node, changeSignal);
Glib::RefPtr<Gtk::Adjustment> fadjust(pfa);
@@ -192,24 +189,27 @@ Gtk::Widget * ParamFloat::get_widget(SPDocument * doc, Inkscape::XML::Node * nod
#endif
if (_mode == FULL) {
-#if WITH_GTKMM_3_0
- Gtk::HScale * scale = Gtk::manage(new Gtk::HScale(fadjust));
-#else
- Gtk::HScale * scale = Gtk::manage(new Gtk::HScale(*fadjust));
-#endif
- scale->set_draw_value(false);
- scale->set_size_request(200, -1);
+
+ UI::Widget::SpinScale *scale = new UI::Widget::SpinScale(_(_text), fadjust, _precision);
+ scale->set_size_request(400, -1);
scale->show();
hbox->pack_start(*scale, false, false);
+
}
+ else if (_mode == MINIMAL) {
+
+ Gtk::Label * label = Gtk::manage(new Gtk::Label(_(_text), Gtk::ALIGN_START));
+ label->show();
+ hbox->pack_start(*label, true, true, _indent);
#if WITH_GTKMM_3_0
Inkscape::UI::Widget::SpinButton * spin = Gtk::manage(new Inkscape::UI::Widget::SpinButton(fadjust, 0.1, _precision));
#else
Inkscape::UI::Widget::SpinButton * spin = Gtk::manage(new Inkscape::UI::Widget::SpinButton(*fadjust, 0.1, _precision));
#endif
- spin->show();
- hbox->pack_start(*spin, false, false);
+ spin->show();
+ hbox->pack_start(*spin, false, false);
+ }
hbox->show();