[utilities/kdebugsettings] src/widgets: Fix dialog size when we use scale != 100

Laurent Montel <[email protected]>
Newsgroups gmane.comp.kde.cvs
Message-ID <[email protected]>
Git commit 6324155ac833198b3fc645711e749c72df3bae5c by Laurent Montel.
Committed on 31/07/2026 at 11:40.
Pushed by mlaurent into branch 'master'.

Fix dialog size when we use scale != 100

M  +3    -1    src/widgets/kdebugsettingsdialog.cpp

https://invent.kde.org/utilities/kdebugsettings/-/commit/6324155ac833198b3fc645711e749c72df3bae5c

diff --git a/src/widgets/kdebugsettingsdialog.cpp b/src/widgets/kdebugsettingsdialog.cpp
index 56994bcc..5d598b70 100644
--- a/src/widgets/kdebugsettingsdialog.cpp
+++ b/src/widgets/kdebugsettingsdialog.cpp
@@ -35,6 +35,7 @@
 
 #include <KAboutData>
 #include <KHelpMenu>
+#include <QScreen>
 
 namespace
 {
@@ -113,7 +114,8 @@ KDebugSettingsDialog::~KDebugSettingsDialog()
 void KDebugSettingsDialog::readConfig()
 {
     create(); // ensure a window is created
-    windowHandle()->resize(QSize(600, 300));
+    const qreal scaleFactor = windowHandle()->screen()->devicePixelRatio();
+    windowHandle()->resize(QSize(600 * scaleFactor, 300 * scaleFactor));
     KConfigGroup group(KSharedConfig::openStateConfig(), QLatin1StringView(KDebugSettingsDialogGroupName));
     KWindowConfig::restoreWindowSize(windowHandle(), group);
     resize(windowHandle()->size()); // workaround for QTBUG-40584
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.