manage display event corectly

This commit is contained in:
Geoffray Levasseur committed 2026-11-03 14:14:36 +01:00
1 parent 92c520dc08
commit 6491f723ff
8 files changed
+22 -38

No files matched your search

+5 -8
View File
@@ -164,6 +164,11 @@ DiaDlg::DiaDlg(QWidget *parent) : FramedDlg(parent), ui(new Ui::DiaDlg)
ui->closeBtn->onClick = [this] { close(); };
ui->toggleBtn->onClick = [this] { toggleBtnClicked(); };
onShow = [this] {
if (windowMode() == WindowMode::Modal)
centerToScreen();
offscreenPaint();
};
}
DiaDlg::~DiaDlg()
@@ -281,14 +286,6 @@ void DiaDlg::vpaint(Dpi::Canvas &canvas)
loweredTextOut(canvas, -1, *MainTexture, (width() - biColorTextWidth(canvas, s)) / 2, 31, s);
}
void DiaDlg::showEvent(QShowEvent *event)
{
FramedDlg::showEvent(event);
if (windowMode() == WindowMode::Modal)
centerToScreen();
offscreenPaint();
}
void DiaDlg::resizeEvent(QResizeEvent *event)
{
FramedDlg::resizeEvent(event);