mirror of
https://codeberg.org/comaps/comaps
synced 2025-12-19 13:03:36 +00:00
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>
This commit is contained in:
committed by
Konstantin Pastbin
parent
3ea15439dd
commit
57fefda452
@@ -15,7 +15,8 @@
|
|||||||
#include <QtWidgets/QVBoxLayout>
|
#include <QtWidgets/QVBoxLayout>
|
||||||
|
|
||||||
AboutDialog::AboutDialog(QWidget * parent)
|
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");
|
QIcon icon(":/ui/logo.png");
|
||||||
setWindowIcon(icon);
|
setWindowIcon(icon);
|
||||||
@@ -64,4 +65,6 @@ AboutDialog::AboutDialog(QWidget * parent)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
setLayout(hBox);
|
setLayout(hBox);
|
||||||
|
|
||||||
|
adjustSize();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user