summaryrefslogtreecommitdiffstats
path: root/src/ui/widget
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui/widget')
-rw-r--r--src/ui/widget/scalar.cpp11
-rw-r--r--src/ui/widget/scalar.h5
2 files changed, 14 insertions, 2 deletions
diff --git a/src/ui/widget/scalar.cpp b/src/ui/widget/scalar.cpp
index 220498561..cc051599c 100644
--- a/src/ui/widget/scalar.cpp
+++ b/src/ui/widget/scalar.cpp
@@ -3,8 +3,9 @@
* Carl Hetherington <inkscape@carlh.net>
* Derek P. Moore <derekm@hackunix.org>
* Bryce Harrington <bryce@bryceharrington.org>
+ * Johan Engelen <j.b.c.engelen@alumnus.utwente.nl>
*
- * Copyright (C) 2004 Carl Hetherington
+ * Copyright (C) 2004-2011 authors
*
* Released under GNU GPL. Read the file 'COPYING' for more information.
*/
@@ -16,6 +17,7 @@
#include "scalar.h"
#include "spinbutton.h"
+#include <gtkmm/scale.h>
namespace Inkscape {
namespace UI {
@@ -133,7 +135,12 @@ void Scalar::update()
static_cast<SpinButton*>(_widget)->update();
}
-
+void Scalar::addSlider()
+{
+ Gtk::HScale *scale = new Gtk::HScale( * static_cast<SpinButton*>(_widget)->get_adjustment() );
+ scale->set_draw_value(false);
+ add (*manage (scale));
+}
Glib::SignalProxy0<void> Scalar::signal_value_changed()
{
diff --git a/src/ui/widget/scalar.h b/src/ui/widget/scalar.h
index c73bcc62a..19ccb7ae0 100644
--- a/src/ui/widget/scalar.h
+++ b/src/ui/widget/scalar.h
@@ -143,6 +143,11 @@ public:
void update();
/**
+ * Adds a slider (HScale) to the left of the spinbox.
+ */
+ void addSlider();
+
+ /**
* Signal raised when the spin button's value changes.
*/
Glib::SignalProxy0<void> signal_value_changed();