!7 fix:修复最大化和最小化失败问题
Merge pull request !7 from zhoudisi/openkylin/nile
This commit is contained in:
commit
ebdc868c87
|
@ -1,3 +1,12 @@
|
|||
yhkylin-backup-tools (4.1.0.1-ok11) nile; urgency=medium
|
||||
|
||||
* BUG: #226486 【wlcom】【备份还原】最小化与最大化按钮失效无响应
|
||||
* 需求号: 无
|
||||
* 其他改动说明: 无
|
||||
* 其他改动影响域: 无
|
||||
|
||||
-- zhoudisi <zhoudisi@kylinos.cn> Thu, 16 May 2024 16:30:06 +0800
|
||||
|
||||
yhkylin-backup-tools (4.1.0.1-ok10) nile; urgency=medium
|
||||
|
||||
* BUG: 无
|
||||
|
|
|
@ -35,9 +35,9 @@ MainDialog::MainDialog(QWidget *parent)
|
|||
this->setProperty("useSystemStyleBlur", true);
|
||||
this->setAutoFillBackground(true);
|
||||
connect(kdk::WindowManager::self(), &kdk::WindowManager::windowAdded, this, [=](const kdk::WindowId& window_id){
|
||||
if (getpid() == kdk::WindowManager::getPid(window_id) && m_window_id == 0)
|
||||
if (getpid() == kdk::WindowManager::getPid(window_id) && m_window_id.isNull())
|
||||
{
|
||||
m_window_id = window_id.toULongLong();
|
||||
m_window_id = window_id.toString();
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -226,16 +226,13 @@ void MainDialog::initConnect()
|
|||
});
|
||||
|
||||
//最小化按钮
|
||||
connect(m_minBtn, &QPushButton::clicked, this, [=](){
|
||||
kdk::WindowManager::minimizeWindow(m_window_id);
|
||||
});
|
||||
|
||||
connect(m_minBtn, &QPushButton::clicked, this, &MainDialog::showMinimized);
|
||||
//最大化按钮
|
||||
connect(m_maxBtn, &QPushButton::clicked, this, [=] {
|
||||
if (isMaximized()) {
|
||||
showNormal();
|
||||
} else {
|
||||
kdk::WindowManager::maximizeWindow(m_window_id);
|
||||
showMaximized();
|
||||
}
|
||||
});
|
||||
connect(m_titleWidget, &DoubleClickWidget::doubleClicked, m_maxBtn, &QPushButton::click);
|
||||
|
@ -444,7 +441,7 @@ void MainDialog::resizeEvent(QResizeEvent *event) {
|
|||
void MainDialog::closeBtn()
|
||||
{
|
||||
if (this->close()) {
|
||||
kdk::WindowManager::closeWindow(m_window_id);
|
||||
qApp->quit();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -74,7 +74,7 @@ private:
|
|||
// 监控是否平板的dbus接口
|
||||
QDBusInterface * m_statusSessionDbus = nullptr;
|
||||
|
||||
quint64 m_window_id;
|
||||
QString m_window_id;
|
||||
|
||||
Ui::MainDialog *ui;
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue