diff options
author | Katarina Behrens <Katarina.Behrens@cib.de> | 2018-02-15 14:06:48 +0100 |
---|---|---|
committer | Katarina Behrens <Katarina.Behrens@cib.de> | 2018-02-16 10:00:24 +0100 |
commit | 3b93b176572971f00845e268c12eef94190d03bc (patch) | |
tree | 3b24a51766d33e0ce639affd4baf200586b8d449 /vcl/unx/gtk3_kde5 | |
parent | 5b12898378556538c86f92ed368d6be6c461a169 (diff) |
gtk3_kde5: Checkboxes on the left, texts on the right
QFormLayout does it the other way round (text left, checkbox right)
and it looks odd, so use QGridLayout
Change-Id: Iff4255f695ce17561bac44e496a3567e1b438581
Reviewed-on: https://gerrit.libreoffice.org/49815
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de>
Diffstat (limited to 'vcl/unx/gtk3_kde5')
-rw-r--r-- | vcl/unx/gtk3_kde5/kde5_filepicker.cxx | 13 | ||||
-rw-r--r-- | vcl/unx/gtk3_kde5/kde5_filepicker.hxx | 4 |
2 files changed, 9 insertions, 8 deletions
diff --git a/vcl/unx/gtk3_kde5/kde5_filepicker.cxx b/vcl/unx/gtk3_kde5/kde5_filepicker.cxx index d774ebc2834e..f3b48b837836 100644 --- a/vcl/unx/gtk3_kde5/kde5_filepicker.cxx +++ b/vcl/unx/gtk3_kde5/kde5_filepicker.cxx @@ -28,7 +28,7 @@ #include <QtGui/QWindow> #include <QtWidgets/QCheckBox> #include <QtWidgets/QFileDialog> -#include <QtWidgets/QFormLayout> +#include <QtWidgets/QGridLayout> #include <QtWidgets/QWidget> #include <QtWidgets/QApplication> @@ -38,7 +38,7 @@ KDE5FilePicker::KDE5FilePicker(QObject* parent) : QObject(parent) , _dialog(new QFileDialog(nullptr, {}, QDir::homePath())) , _extraControls(new QWidget) - , _layout(new QFormLayout(_extraControls)) + , _layout(new QGridLayout(_extraControls)) , _winId(0) , allowRemoteUrls(false) { @@ -197,13 +197,14 @@ QString KDE5FilePicker::getLabel(sal_Int16 controlId) const void KDE5FilePicker::addCheckBox(sal_Int16 controlId, const QString& label, bool hidden) { - auto widget = new QCheckBox(_extraControls); + auto resString = label; + resString.replace('~', '&'); + + auto widget = new QCheckBox(resString, _extraControls); widget->setHidden(hidden); if (!hidden) { - auto resString = label; - resString.replace('~', '&'); - _layout->addRow(resString, widget); + _layout->addWidget(widget); } _customWidgets.insert(controlId, widget); } diff --git a/vcl/unx/gtk3_kde5/kde5_filepicker.hxx b/vcl/unx/gtk3_kde5/kde5_filepicker.hxx index 17a37b7e27a3..d999f7bf7a09 100644 --- a/vcl/unx/gtk3_kde5/kde5_filepicker.hxx +++ b/vcl/unx/gtk3_kde5/kde5_filepicker.hxx @@ -28,7 +28,7 @@ class QFileDialog; class QWidget; -class QFormLayout; +class QGridLayout; class KDE5FilePicker : public QObject { @@ -51,7 +51,7 @@ protected: QWidget* _extraControls; //layout for extra custom controls - QFormLayout* _layout; + QGridLayout* _layout; sal_uIntPtr _winId; |