summaryrefslogtreecommitdiffstats
path: root/src/extension/extension.cpp
diff options
context:
space:
mode:
authorPatrick Storz <eduard.braun2@gmx.de>2019-09-01 16:56:35 +0000
committerPatrick Storz <eduard.braun2@gmx.de>2019-09-01 16:56:35 +0000
commitc6067b75a239a1322598f2d85ef0ce7cc59df0d4 (patch)
treef91f4514e7fc563d01a0cbe04a863ab0a488acfd /src/extension/extension.cpp
parentAdd appearance="colorbutton" to parameters of type color (diff)
downloadinkscape-c6067b75a239a1322598f2d85ef0ce7cc59df0d4.tar.gz
inkscape-c6067b75a239a1322598f2d85ef0ce7cc59df0d4.zip
Add appearance="multiline" to parameters of type string
Renders a Gtk::TextView that automatically fills the available space in the extension's preferences dialog and can be used to accept longer multi-line strings. Newlines in the string value will be passed as "\\n" to the extension script (i.e. literal '\n' with the backspace escaped).
Diffstat (limited to 'src/extension/extension.cpp')
-rw-r--r--src/extension/extension.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/extension/extension.cpp b/src/extension/extension.cpp
index 7836a8479..b8c3242a5 100644
--- a/src/extension/extension.cpp
+++ b/src/extension/extension.cpp
@@ -722,7 +722,8 @@ public:
void addWidget(Gtk::Widget *widg, gchar const *tooltip, int indent) {
if (widg) {
widg->set_margin_start(indent * InxParameter::GUI_INDENTATION);
- this->pack_start(*widg, false, false, 0);
+ this->pack_start(*widg, false, true, 0); // fill=true does not have an effect here, but allows the
+ // child to choose to expand by setting hexpand/vexpand
if (tooltip) {
widg->set_tooltip_text(tooltip);
} else {