按钮申请主题切换时,调色板不自动更换,导致hover背景色不对
This commit is contained in:
parent
dc2da1a745
commit
c9837b7b46
|
@ -212,13 +212,13 @@ void DataBackup::initFirstWidget()
|
|||
ManageBackupPointList backupManager(first, ManageBackupPointList::DATA);
|
||||
backupManager.exec();
|
||||
});
|
||||
// connect(GlobelBackupInfo::inst().getGlobalSignals(), &GlobalSignals::styleNameChanged, this, [=](bool isDark) {
|
||||
// Q_UNUSED(isDark)
|
||||
// // 深浅主题切换时,因为调色板已经更换,高亮等颜色已经改变,所以要重新加载图标。
|
||||
// QPalette pal(backupPointManage->palette());
|
||||
// pal.setColor(QPalette::Button, this->palette().base().color());
|
||||
// backupPointManage->setPalette(pal);
|
||||
// });
|
||||
connect(GlobelBackupInfo::inst().getGlobalSignals(), &GlobalSignals::styleNameChanged, this, [=](bool isDark) {
|
||||
Q_UNUSED(isDark)
|
||||
// 深浅主题切换时,因为调色板已经更换,高亮等颜色已经改变,所以要重新加载图标。
|
||||
QPalette pal(backupPointManage->palette());
|
||||
pal.setColor(QPalette::Button, this->palette().base().color());
|
||||
backupPointManage->setPalette(pal);
|
||||
});
|
||||
|
||||
addWidget(first);
|
||||
}
|
||||
|
|
|
@ -165,13 +165,13 @@ void SystemBackup::initFirstWidget()
|
|||
ManageBackupPointList backupManager(first, ManageBackupPointList::SYSTEM);
|
||||
backupManager.exec();
|
||||
});
|
||||
// connect(GlobelBackupInfo::inst().getGlobalSignals(), &GlobalSignals::styleNameChanged, this, [=](bool isDark) {
|
||||
// Q_UNUSED(isDark)
|
||||
// // 深浅主题切换时,因为调色板已经更换,高亮等颜色已经改变,所以要重新加载图标。
|
||||
// QPalette pal(backupPointManage->palette());
|
||||
// pal.setColor(QPalette::Button, this->palette().base().color());
|
||||
// backupPointManage->setPalette(pal);
|
||||
// });
|
||||
connect(GlobelBackupInfo::inst().getGlobalSignals(), &GlobalSignals::styleNameChanged, this, [=](bool isDark) {
|
||||
Q_UNUSED(isDark)
|
||||
// 深浅主题切换时,因为调色板已经更换,高亮等颜色已经改变,所以要重新加载图标。
|
||||
QPalette pal(backupPointManage->palette());
|
||||
pal.setColor(QPalette::Button, this->palette().base().color());
|
||||
backupPointManage->setPalette(pal);
|
||||
});
|
||||
|
||||
addWidget(first);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue