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-separator.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-separator.cpp')
| -rw-r--r-- | src/extension/prefdialog/widget-separator.cpp | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/src/extension/prefdialog/widget-separator.cpp b/src/extension/prefdialog/widget-separator.cpp new file mode 100644 index 000000000..94778e027 --- /dev/null +++ b/src/extension/prefdialog/widget-separator.cpp @@ -0,0 +1,42 @@ +// SPDX-License-Identifier: GPL-2.0-or-later +/** @file + * Separator widget for extensions + *//* + * Authors: + * Patrick Storz <eduard.braun2@gmx.de> + * + * Copyright (C) 2019 Authors + * + * Released under GNU GPL v2+, read the file 'COPYING' for more information. + */ + +#include "widget-separator.h" + +#include <gtkmm/separator.h> + +#include "xml/node.h" +#include "extension/extension.h" + +namespace Inkscape { +namespace Extension { + + +WidgetSeparator::WidgetSeparator(Inkscape::XML::Node *xml, Inkscape::Extension::Extension *ext) + : InxWidget(xml, ext) +{ +} + +/** \brief Create a label for the description */ +Gtk::Widget *WidgetSeparator::get_widget(sigc::signal<void> *changeSignal) +{ + if (_hidden) { + return nullptr; + } + + Gtk::Separator *separator = Gtk::manage(new Gtk::Separator()); + separator->show(); + return dynamic_cast<Gtk::Widget *>(separator); +} + +} /* namespace Extension */ +} /* namespace Inkscape */ |
