From a4eea75612acbbfd6b8aed6b48090ca2c76ee657 Mon Sep 17 00:00:00 2001 From: Patrick Storz Date: Sat, 10 Aug 2019 21:25:41 +0200 Subject: Add new widget "spacer" which adds an empty space between widgets The attribute "size" allows to define the spacing in px. The special value "expand" can be used to make the spacer consume all available space in the parent. --- src/extension/prefdialog/widget-box.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/extension/prefdialog/widget-box.cpp') diff --git a/src/extension/prefdialog/widget-box.cpp b/src/extension/prefdialog/widget-box.cpp index d7b93e3ff..2c9d24f4a 100644 --- a/src/extension/prefdialog/widget-box.cpp +++ b/src/extension/prefdialog/widget-box.cpp @@ -84,6 +84,12 @@ Gtk::Widget *WidgetBox::get_widget(sigc::signal *changeSignal) // revisit this later, possibly implementing GtkFrame or similar box->set_spacing(GUI_BOX_SPACING); + if (_orientation == HORIZONTAL) { + box->set_vexpand(false); + } else { + box->set_hexpand(false); + } + // add child widgets onto page (if any) for (auto child : _children) { Gtk::Widget *child_widget = child->get_widget(changeSignal); -- cgit v1.2.3