From 7c749c803fbbd446a1536883d703f7077e92ec12 Mon Sep 17 00:00:00 2001 From: Raul Metsma Date: Mon, 27 May 2024 14:10:50 +0300 Subject: [PATCH] Fix layout with all languages WE2-822 Signed-off-by: Raul Metsma --- src/ui/webeiddialog.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ui/webeiddialog.cpp b/src/ui/webeiddialog.cpp index 93bcfa14..35950e15 100644 --- a/src/ui/webeiddialog.cpp +++ b/src/ui/webeiddialog.cpp @@ -120,6 +120,7 @@ WebEidDialog::WebEidDialog(QWidget* parent) : WebEidUI(parent), ui(new Private) auto* layout = new QGridLayout(menu); layout->setContentsMargins(1, 1, 1, 1); layout->setSpacing(1); + layout->setSizeConstraint(QLayout::SetFixedSize); auto* langGroup = new QButtonGroup(menu); langGroup->setExclusive(true); int i {}; @@ -136,8 +137,7 @@ WebEidDialog::WebEidDialog(QWidget* parent) : WebEidUI(parent), ui(new Private) ++i; } menu->show(); - menu->adjustSize(); - menu->move(ui->langButton->geometry().bottomRight() - QPoint(menu->width() - 1, -2)); + menu->move(ui->langButton->geometry().bottomRight() - menu->geometry().topRight() + QPoint(0, 2)); connect(langGroup, qOverload(&QButtonGroup::buttonClicked), menu, [this, menu](QAbstractButton* action) { QSettings().setValue(QStringLiteral("lang"), action->property("lang"));