From c6067b75a239a1322598f2d85ef0ce7cc59df0d4 Mon Sep 17 00:00:00 2001 From: Patrick Storz Date: Sun, 1 Sep 2019 18:56:35 +0200 Subject: 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). --- src/extension/prefdialog/parameter-notebook.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/extension/prefdialog/parameter-notebook.cpp') diff --git a/src/extension/prefdialog/parameter-notebook.cpp b/src/extension/prefdialog/parameter-notebook.cpp index a139bd2bd..a90935ca1 100644 --- a/src/extension/prefdialog/parameter-notebook.cpp +++ b/src/extension/prefdialog/parameter-notebook.cpp @@ -82,7 +82,8 @@ Gtk::Widget *ParamNotebook::ParamNotebookPage::get_widget(sigc::signal *ch if (child_widget) { int indent = child->get_indent(); child_widget->set_margin_start(indent *GUI_INDENTATION); - vbox->pack_start(*child_widget, false, false, 0); + vbox->pack_start(*child_widget, false, true, 0); // fill=true does not have an effect here, but allows the + // child to choose to expand by setting hexpand/vexpand const char *tooltip = child->get_tooltip(); if (tooltip) { -- cgit v1.2.3