summaryrefslogtreecommitdiffstats
path: root/src/extension/param/int.cpp
diff options
context:
space:
mode:
authorShlomi Fish <shlomif@shlomifish.org>2017-02-23 14:39:39 +0000
committerShlomi Fish <shlomif@shlomifish.org>2017-02-23 14:39:39 +0000
commitd82d8e6de61b5a3da73af7d7003b8281720c3dc1 (patch)
tree50a151920b32f95afd0fa0c04f175322657ebb18 /src/extension/param/int.cpp
parentMerged. (diff)
parentDisplay style attribute properties when object row selected. Allow their dele... (diff)
downloadinkscape-d82d8e6de61b5a3da73af7d7003b8281720c3dc1.tar.gz
inkscape-d82d8e6de61b5a3da73af7d7003b8281720c3dc1.zip
Merged.
(bzr r15369.1.19)
Diffstat (limited to 'src/extension/param/int.cpp')
-rw-r--r--src/extension/param/int.cpp39
1 files changed, 19 insertions, 20 deletions
diff --git a/src/extension/param/int.cpp b/src/extension/param/int.cpp
index 222d4f243..538ddc08d 100644
--- a/src/extension/param/int.cpp
+++ b/src/extension/param/int.cpp
@@ -27,17 +27,21 @@ namespace Extension {
/** Use the superclass' allocator and set the \c _value. */
-ParamInt::ParamInt (const gchar * name,
- const gchar * guitext,
- const gchar * desc,
- const Parameter::_scope_t scope,
- bool gui_hidden,
- const gchar * gui_tip,
- Inkscape::Extension::Extension * ext,
- Inkscape::XML::Node * xml,
- AppearanceMode mode) :
- Parameter(name, guitext, desc, scope, gui_hidden, gui_tip, ext),
- _value(0), _mode(mode), _indent(0), _min(0), _max(10)
+ParamInt::ParamInt(const gchar * name,
+ const gchar * guitext,
+ const gchar * desc,
+ const Parameter::_scope_t scope,
+ bool gui_hidden,
+ const gchar * gui_tip,
+ int indent,
+ Inkscape::Extension::Extension * ext,
+ Inkscape::XML::Node * xml,
+ AppearanceMode mode)
+ : Parameter(name, guitext, desc, scope, gui_hidden, gui_tip, indent, ext)
+ , _value(0)
+ , _mode(mode)
+ , _min(0)
+ , _max(10)
{
const char * defaultval = NULL;
if (xml->firstChild() != NULL) {
@@ -62,11 +66,6 @@ ParamInt::ParamInt (const gchar * name,
_min = 0;
}
- const char * indent = xml->attribute("indent");
- if (indent != NULL) {
- _indent = atoi(indent) * 12;
- }
-
gchar *pref_name = this->pref_name();
Inkscape::Preferences *prefs = Inkscape::Preferences::get();
_value = prefs->getInt(extension_pref_root + pref_name, _value);
@@ -156,7 +155,7 @@ ParamInt::get_widget (SPDocument * doc, Inkscape::XML::Node * node, sigc::signal
return NULL;
}
- Gtk::HBox * hbox = Gtk::manage(new Gtk::HBox(false, 4));
+ Gtk::HBox * hbox = Gtk::manage(new Gtk::HBox(false, Parameter::GUI_PARAM_WIDGETS_SPACING));
auto pia = new ParamIntAdjustment(this, doc, node, changeSignal);
Glib::RefPtr<Gtk::Adjustment> fadjust(pia);
@@ -166,13 +165,13 @@ ParamInt::get_widget (SPDocument * doc, Inkscape::XML::Node * node, sigc::signal
UI::Widget::SpinScale *scale = new UI::Widget::SpinScale(_(_text), fadjust, 0);
scale->set_size_request(400, -1);
scale->show();
- hbox->pack_start(*scale, false, false);
+ hbox->pack_start(*scale, true, true);
}
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);
+ hbox->pack_start(*label, true, true);
auto spin = Gtk::manage(new Inkscape::UI::Widget::SpinButton(fadjust, 1.0, 0));
spin->show();