[rkward] /: Don't forget to add stretch widget to the layout.
Thomas Friedrichsmeier
null at kde.org
Wed May 16 08:41:18 UTC 2018
Git commit 8eb957f8fa98c8074a7ce35170278731b3ad6f70 by Thomas Friedrichsmeier.
Committed on 16/05/2018 at 08:41.
Pushed by tfry into branch 'master'.
Don't forget to add stretch widget to the layout.
M +1 -0 ChangeLog
M +1 -0 rkward/plugin/rkstandardcomponent.cpp
https://commits.kde.org/rkward/8eb957f8fa98c8074a7ce35170278731b3ad6f70
diff --git a/ChangeLog b/ChangeLog
index 4edb8347..ab58a8c2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,5 @@
--- Version 0.7.1 - UNRELEASED
+- Fixed a layout issue in plugins using <stretch>-elements that would sometimes also render top-left aligned UI-elements unsuable.
- Remove a bit of unused empty space around the main area of plugin dialogs
- Expand root level objects (esp. data.frames) by default in plugin object lists. Add button to toggle back to collapsed.
- Allow Tab-key to advance to the next row of data in data editor
diff --git a/rkward/plugin/rkstandardcomponent.cpp b/rkward/plugin/rkstandardcomponent.cpp
index 61a71bf2..89538c00 100644
--- a/rkward/plugin/rkstandardcomponent.cpp
+++ b/rkward/plugin/rkstandardcomponent.cpp
@@ -596,6 +596,7 @@ void RKComponentBuilder::buildElement (const QDomElement &element, XMLHelper &xm
} else if (e.tagName () == QLatin1String ("stretch")) {
QWidget *stretch = new QWidget (parent_widget);
stretch->setSizePolicy (QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding);
+ parent_widget->layout ()->addWidget (stretch);
QBoxLayout *box = dynamic_cast<QBoxLayout *> (parent_widget->layout ());
// RK_ASSERT (box); <- NO, also meaningful in a <frame>
if (box) box->setStretchFactor (stretch, 100);
More information about the rkward-tracker
mailing list