[utilities/kdebugsettings] src/widgets: Fix dialog size
Laurent Montel <[email protected]>
| Newsgroups | gmane.comp.kde.cvs |
|---|---|
| Message-ID | <[email protected]> |
Git commit c50e8202e5ba070eef2f9cabedf76d70e0a1b526 by Laurent Montel.
Committed on 31/07/2026 at 19:27.
Pushed by mlaurent into branch 'master'.
Fix dialog size
M +3 -1 src/widgets/groupmanagementdialog.cpp
https://invent.kde.org/utilities/kdebugsettings/-/commit/c50e8202e5ba070eef2f9cabedf76d70e0a1b526
diff --git a/src/widgets/groupmanagementdialog.cpp b/src/widgets/groupmanagementdialog.cpp
index 80ce8325..c6138fee 100644
--- a/src/widgets/groupmanagementdialog.cpp
+++ b/src/widgets/groupmanagementdialog.cpp
@@ -14,6 +14,7 @@
#include <KSharedConfig>
#include <KWindowConfig>
#include <QDialogButtonBox>
+#include <QScreen>
#include <QVBoxLayout>
#include <QWindow>
@@ -48,7 +49,8 @@ GroupManagementDialog::~GroupManagementDialog()
void GroupManagementDialog::readConfig()
{
create(); // ensure a window is created
- windowHandle()->resize(QSize(400, 300));
+ const qreal scaleFactor = windowHandle()->screen()->devicePixelRatio();
+ windowHandle()->resize(QSize(400 * scaleFactor, 300 * scaleFactor));
KConfigGroup group(KSharedConfig::openStateConfig(), QLatin1StringView(myGroupManagementDialogGroupName));
KWindowConfig::restoreWindowSize(windowHandle(), group);
resize(windowHandle()->size()); // workaround for QTBUG-40584