Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: dialog window display position error #183

Merged
merged 2 commits into from
Aug 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions calendar-client/src/dialog/schedulectrldlg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#include "scheduledatamanage.h"
#include "cdynamicicon.h"
#include "constants.h"
#include <QTimer>

#include <DMessageBox>
#include <DPushButton>
Expand Down Expand Up @@ -135,8 +136,12 @@ void CScheduleCtrlDlg::changeEvent(QEvent *event)
button->setText(text_button);
}
}
setFixedHeight(36 + 48 + height_firstLabel + height_seconLabel + 30);
gwi->setFixedHeight(height_firstLabel + height_seconLabel);
// 在changeEvent里使用setFixedHeight会导致弹出的确认对话框会显示在左上角
// 推测是窗口的问题, 先通过延迟在应用层临时解决
QTimer::singleShot(10, this, [this, height_firstLabel, height_seconLabel]{
setFixedHeight(36 + 48 + height_firstLabel + height_seconLabel + 30);
gwi->setFixedHeight(height_firstLabel + height_seconLabel);
});
}

void CScheduleCtrlDlg::buttonJudge(int id)
Expand Down
6 changes: 6 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
dde-calendar (5.14.3) unstable; urgency=medium

* fix: dialog window display position error(Issue: https://github.com/linuxdeepin/developer-center/issues/10141)

-- myml <[email protected]> Mon, 05 Aug 2024 14:16:16 +0800

dde-calendar (5.14.2) unstable; urgency=medium

* chore: dbus activation adapt to AM(Issue: https://github.com/linuxdeepin/developer-center/issues/9742)
Expand Down
Loading