diff options
| author | Patrick Storz <eduard.braun2@gmx.de> | 2019-08-10 17:56:50 +0000 |
|---|---|---|
| committer | Patrick Storz <eduard.braun2@gmx.de> | 2019-08-31 14:50:39 +0000 |
| commit | e610752037735e10980a62a7ca7f0c3b2bd99d7d (patch) | |
| tree | 4b7062448a2c8831491241a18c54683f03bf017d /src/extension/prefdialog/widget.cpp | |
| parent | Add new widgets "hbox" and "vbox" for layouting purposes (diff) | |
| download | inkscape-e610752037735e10980a62a7ca7f0c3b2bd99d7d.tar.gz inkscape-e610752037735e10980a62a7ca7f0c3b2bd99d7d.zip | |
Add new widget "separator" which draws a line between widgets
Diffstat (limited to 'src/extension/prefdialog/widget.cpp')
| -rw-r--r-- | src/extension/prefdialog/widget.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/extension/prefdialog/widget.cpp b/src/extension/prefdialog/widget.cpp index 097406763..eb9d23e07 100644 --- a/src/extension/prefdialog/widget.cpp +++ b/src/extension/prefdialog/widget.cpp @@ -14,6 +14,7 @@ #include "widget.h" #include "widget-box.h" #include "widget-label.h" +#include "widget-separator.h" #include <algorithm> @@ -48,6 +49,8 @@ InxWidget *InxWidget::make(Inkscape::XML::Node *in_repr, Inkscape::Extension::Ex widget = new WidgetBox(in_repr, in_ext); } else if (!strcmp(name, "label")) { widget = new WidgetLabel(in_repr, in_ext); + } else if (!strcmp(name, "separator")) { + widget = new WidgetSeparator(in_repr, in_ext); } else if (!strcmp(name, "param")) { widget = InxParameter::make(in_repr, in_ext); } else { @@ -61,7 +64,7 @@ InxWidget *InxWidget::make(Inkscape::XML::Node *in_repr, Inkscape::Extension::Ex bool InxWidget::is_valid_widget_name(const char *name) { // keep in sync with names supported in InxWidget::make() above - static const std::vector<std::string> valid_names = {"hbox", "vbox", "label", "param"}; + static const std::vector<std::string> valid_names = {"hbox", "vbox", "label", "separator", "param"}; if (std::find(valid_names.begin(), valid_names.end(), name) != valid_names.end()) { return true; |
