From 57fefda452821450044efa5378451d1a50ffad87 Mon Sep 17 00:00:00 2001 From: rayzex_gt <62294693+gezawatt@users.noreply.github.com> Date: Mon, 26 May 2025 09:32:53 +0300 Subject: [PATCH] Fix "About" dialog window flags on desktop. (#10586) * Update about.cpp On desktop, on Linux, when I open the "About" dialog, I can: 1: Minimize the app by pressing "minimize" button in the dialog; 2: Maximisze the dialog; 3: Close the dialog. When building the app on Windows, I can do neither of those things. I suggest setting those Window flags explicitly to achieve same behaviour across platforms. Signed-off-by: rayzex_gt <62294693+gezawatt@users.noreply.github.com> * Only adding an essential fix. Only adding an essential button to the window (the "X" close button) to avoid soft-locking the user on Windows when opening the dialog. Signed-off-by: rayzex_gt <62294693+gezawatt@users.noreply.github.com> * Added an explicit "Maximize window" and "Close window" flags. Signed-off-by: rayzex_gt <62294693+gezawatt@users.noreply.github.com> * Added ajustSize(); at the end of "About" window constructor. Added an "ajustSize();" method call at the end of the "About" window constructor. Now height() and width() methods show correct window size. Now it also would be possible to call setFixedSize() if needed. Signed-off-by: rayzex_gt <62294693+gezawatt@users.noreply.github.com> --------- Signed-off-by: rayzex_gt <62294693+gezawatt@users.noreply.github.com> --- qt/about.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/qt/about.cpp b/qt/about.cpp index 7d6657f2a..c6ab2d515 100644 --- a/qt/about.cpp +++ b/qt/about.cpp @@ -15,7 +15,8 @@ #include AboutDialog::AboutDialog(QWidget * parent) - : QDialog(parent, Qt::WindowTitleHint | Qt::WindowSystemMenuHint) + : QDialog(parent, Qt::WindowTitleHint | Qt::WindowSystemMenuHint | + Qt::WindowMaximizeButtonHint | Qt::WindowCloseButtonHint) { QIcon icon(":/ui/logo.png"); setWindowIcon(icon); @@ -64,4 +65,6 @@ AboutDialog::AboutDialog(QWidget * parent) } else setLayout(hBox); + + adjustSize(); }