From e610752037735e10980a62a7ca7f0c3b2bd99d7d Mon Sep 17 00:00:00 2001 From: Patrick Storz Date: Sat, 10 Aug 2019 19:56:50 +0200 Subject: Add new widget "separator" which draws a line between widgets --- src/extension/prefdialog/widget.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/extension/prefdialog/widget.cpp') 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 @@ -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 valid_names = {"hbox", "vbox", "label", "param"}; + static const std::vector valid_names = {"hbox", "vbox", "label", "separator", "param"}; if (std::find(valid_names.begin(), valid_names.end(), name) != valid_names.end()) { return true; -- cgit v1.2.3