summaryrefslogtreecommitdiffstats
path: root/src/extension/param
diff options
context:
space:
mode:
authorEduard Braun <eduard.braun2@gmx.de>2017-02-12 18:51:27 +0000
committerEduard Braun <eduard.braun2@gmx.de>2017-02-12 18:51:27 +0000
commit2295a47ec000543b6316213e54f715dc4d1e64c9 (patch)
tree816a9e298c76d39187463076a711c8046e195f10 /src/extension/param
parentExtensions: Make "indent" attribute a common attribute for all parameters tha... (diff)
downloadinkscape-2295a47ec000543b6316213e54f715dc4d1e64c9.tar.gz
inkscape-2295a47ec000543b6316213e54f715dc4d1e64c9.zip
Extensions: Harmonize appearance and try to simplify layouting a bit
(bzr r15509)
Diffstat (limited to 'src/extension/param')
-rw-r--r--src/extension/param/notebook.cpp7
-rw-r--r--src/extension/param/parameter.h9
2 files changed, 13 insertions, 3 deletions
diff --git a/src/extension/param/notebook.cpp b/src/extension/param/notebook.cpp
index bfdff885a..8ef48926e 100644
--- a/src/extension/param/notebook.cpp
+++ b/src/extension/param/notebook.cpp
@@ -214,7 +214,8 @@ Gtk::Widget * ParamNotebookPage::get_widget(SPDocument * doc, Inkscape::XML::Nod
}
Gtk::VBox * vbox = Gtk::manage(new Gtk::VBox);
- vbox->set_border_width(5);
+ vbox->set_border_width(Parameter::GUI_BOX_MARGIN);
+ vbox->set_spacing(Parameter::GUI_BOX_SPACING);
// add parameters onto page (if any)
for (GSList * list = parameters; list != NULL; list = g_slist_next(list)) {
@@ -222,8 +223,8 @@ Gtk::Widget * ParamNotebookPage::get_widget(SPDocument * doc, Inkscape::XML::Nod
Gtk::Widget * widg = param->get_widget(doc, node, changeSignal);
if (widg) {
int indent = param->get_indent();
- widg->set_margin_left(indent*12);
- vbox->pack_start(*widg, false, false, 2);
+ widg->set_margin_left(indent * Parameter::GUI_INDENTATION);
+ vbox->pack_start(*widg, false, false, 0);
gchar const * tip = param->get_tooltip();
if (tip) {
diff --git a/src/extension/param/parameter.h b/src/extension/param/parameter.h
index c787a7c97..edbd9ce08 100644
--- a/src/extension/param/parameter.h
+++ b/src/extension/param/parameter.h
@@ -159,6 +159,15 @@ public:
/** All the code in Notebook::get_param to get the notebook content. */
virtual Parameter *get_param(gchar const *name);
+
+ /** Recommended margin of boxes containing parameters */
+ const static int GUI_BOX_MARGIN = 10;
+ /** Recommended spacing between individual parameters when packing into boxes */
+ const static int GUI_BOX_SPACING = 4;
+ /** Recommended indentation width of parameters */
+ const static int GUI_INDENTATION = 12;
+
+
protected:
/** Description of the parameter. */
gchar * _desc;