From 59a9df4ea4f05acb6b926322871d8ae388f6a998 Mon Sep 17 00:00:00 2001 From: Martin Dvorak Date: Thu, 1 Feb 2024 06:36:36 +0100 Subject: [PATCH] Fixing wrong layout/multi-layout bugs. --- app/src/qt/dialogs/note_new_dialog.cpp | 5 +++-- app/src/qt/dialogs/outline_new_dialog.cpp | 5 +++-- app/src/qt/dialogs/wingman_dialog.cpp | 15 +++++++++------ 3 files changed, 15 insertions(+), 10 deletions(-) diff --git a/app/src/qt/dialogs/note_new_dialog.cpp b/app/src/qt/dialogs/note_new_dialog.cpp index 8293efa5..0a1c16ce 100644 --- a/app/src/qt/dialogs/note_new_dialog.cpp +++ b/app/src/qt/dialogs/note_new_dialog.cpp @@ -61,10 +61,11 @@ NoteNewDialog::GeneralTab::GeneralTab(Ontology& ontology, QWidget *parent) QVBoxLayout* basicLayout = new QVBoxLayout{this}; basicLayout->addWidget(nameLabel); - QHBoxLayout* nameLayout = new QHBoxLayout{this}; + QWidget* eji = new QWidget{this}; + QHBoxLayout* nameLayout = new QHBoxLayout{eji}; nameLayout->addWidget(nameEdit); nameLayout->addWidget(emojisButton); - basicLayout->addLayout(nameLayout); + basicLayout->addWidget(eji); basicLayout->addWidget(positionLabel); basicLayout->addWidget(positionCombo); diff --git a/app/src/qt/dialogs/outline_new_dialog.cpp b/app/src/qt/dialogs/outline_new_dialog.cpp index a0afd34e..c6f81f08 100644 --- a/app/src/qt/dialogs/outline_new_dialog.cpp +++ b/app/src/qt/dialogs/outline_new_dialog.cpp @@ -61,10 +61,11 @@ OutlineNewDialog::GeneralTab::GeneralTab(Ontology& ontology, QWidget *parent) QVBoxLayout* basicLayout = new QVBoxLayout{this}; basicLayout->addWidget(nameLabel); - QHBoxLayout* nameLayout = new QHBoxLayout{this}; + QWidget* eji = new QWidget{this}; + QHBoxLayout* nameLayout = new QHBoxLayout{eji}; nameLayout->addWidget(nameEdit); nameLayout->addWidget(emojisButton); - basicLayout->addLayout(nameLayout); + basicLayout->addWidget(eji); basicLayout->addWidget(typeLabel); basicLayout->addWidget(typeCombo); diff --git a/app/src/qt/dialogs/wingman_dialog.cpp b/app/src/qt/dialogs/wingman_dialog.cpp index 2eb33bd4..ef34d680 100644 --- a/app/src/qt/dialogs/wingman_dialog.cpp +++ b/app/src/qt/dialogs/wingman_dialog.cpp @@ -105,18 +105,21 @@ WingmanDialog::WingmanDialog(QWidget* parent) progressBar->hide(); QHBoxLayout* contentLayout = new QHBoxLayout{this}; - QVBoxLayout* contentLayout1 = new QVBoxLayout{this}; + QWidget* cw1 = new QWidget{this}; + QVBoxLayout* contentLayout1 = new QVBoxLayout{cw1}; contentLayout1->addWidget(contextNameLabel); contentLayout1->addWidget(contextNameEdit); - contentLayout->addLayout(contentLayout1); - QVBoxLayout* contentLayout2 = new QVBoxLayout{this}; + contentLayout->addWidget(cw1); + QWidget* cw2 = new QWidget{this}; + QVBoxLayout* contentLayout2 = new QVBoxLayout{cw2}; contentLayout2->addWidget(contextLabel); contentLayout2->addWidget(contextEdit); - contentLayout->addLayout(contentLayout2); - QVBoxLayout* contentLayout3 = new QVBoxLayout{this}; + contentLayout->addWidget(cw2); + QWidget* cw3 = new QWidget{this}; + QVBoxLayout* contentLayout3 = new QVBoxLayout{cw3}; contentLayout3->addWidget(contextTypeLabel); contentLayout3->addWidget(contextTypeEdit); - contentLayout->addLayout(contentLayout3); + contentLayout->addWidget(cw3); contextGroup->setLayout(contentLayout); contextGroup->hide();