summaryrefslogtreecommitdiffstats
path: root/src/extension/param/float.h
diff options
context:
space:
mode:
authorEduard Braun <eduard.braun2@gmx.de>2017-02-12 14:59:14 +0000
committerEduard Braun <eduard.braun2@gmx.de>2017-02-12 14:59:14 +0000
commita65a0a21e5452ced77123a8b846ff10cc1bc74b0 (patch)
tree9a263d66a1fafaaf5243a57c420197274a626e35 /src/extension/param/float.h
parentFix and improve window sizing and positioning behavior when opening new docum... (diff)
downloadinkscape-a65a0a21e5452ced77123a8b846ff10cc1bc74b0.tar.gz
inkscape-a65a0a21e5452ced77123a8b846ff10cc1bc74b0.zip
Extensions: Make "indent" attribute a common attribute for all parameters that behaves more consistent and predictable than before.
- Every "Parameter" now has an "_indent" member variable (specifying the indentation level; set in "Parameter::make()", see parameter.cpp) - Indentation is achieved by using "set_margin_left()" on the parameter's widget. This fixes bug #1662035 (comment #4 contains some more details about this patch). - Specifying "indent" on a parameter will now work consistently for all parameters. Previously the "indent" attribute often had no effect at all, e.g. for notebooks but also for parameters with 'appearance="full"' which was reasonable in most cases but made the outcome of using this attribute often unpredictable and is unnecessarily restrictive. - Most visible change: "description"s always used an indentation level of at least one (even if no indentation was specified). For the sake of consistency this discrepancy was dropped. Previous appearance can easily be restored by setting 'indent="1"'. Fixed bugs: - https://launchpad.net/bugs/1662035 (bzr r15508)
Diffstat (limited to 'src/extension/param/float.h')
-rw-r--r--src/extension/param/float.h21
1 files changed, 11 insertions, 10 deletions
diff --git a/src/extension/param/float.h b/src/extension/param/float.h
index 42b1698b1..7fd86cea7 100644
--- a/src/extension/param/float.h
+++ b/src/extension/param/float.h
@@ -29,15 +29,17 @@ public:
enum AppearanceMode {
FULL, MINIMAL
};
- ParamFloat (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);
+ ParamFloat(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);
+
/** Returns \c _value. */
float get(const SPDocument * /*doc*/, const Inkscape::XML::Node * /*node*/) const { return _value; }
@@ -60,7 +62,6 @@ private:
/** Internal value. */
float _value;
AppearanceMode _mode;
- int _indent;
float _min;
float _max;
int _precision;