From 4a18bc897d29cfa000ab642c8ed8f036f3461d8d Mon Sep 17 00:00:00 2001 From: Graham Dawes Date: Mon, 14 Jan 2019 08:06:34 +0000 Subject: [PATCH] Improve layout of radioboxes in horizontal sizers with expand flag under wxQT --- src/qt/radiobox.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/qt/radiobox.cpp b/src/qt/radiobox.cpp index 17cc6a0b0a..b73a881a78 100644 --- a/src/qt/radiobox.cpp +++ b/src/qt/radiobox.cpp @@ -178,11 +178,15 @@ bool wxRadioBox::Create(wxWindow *parent, AddChoices( m_qtButtonGroup, m_qtGridLayout, n, choices, style, majorDim ); - QVBoxLayout *qtBoxLayout = new QVBoxLayout; - qtBoxLayout->addLayout(m_qtGridLayout); - qtBoxLayout->addStretch(); + QVBoxLayout *vertLayout = new QVBoxLayout; + vertLayout->addLayout(m_qtGridLayout); + vertLayout->addStretch(); - m_qtGroupBox->setLayout(qtBoxLayout); + QHBoxLayout *horzLayout = new QHBoxLayout; + horzLayout->addLayout(vertLayout); + horzLayout->addStretch(); + + m_qtGroupBox->setLayout(horzLayout); return QtCreateControl( parent, id, pos, size, style, val, name ); }