mirror of
https://github.com/linuxdeepin/dde-dock.git
synced 2025-06-04 17:33:05 +00:00
feat: 添加控制中心修改系统时间(年月)时,任务栏日历图标上刷新
在刷新Icon中添加年月的判断 Log: 添加控制中心修改系统时间(年月)时,任务栏日历图标上刷新 Task: https://pms.uniontech.com/zentao/task-view-75885.html Change-Id: I9761322a277be7e5c78482c1c8bc8855f9a85f9e
This commit is contained in:
parent
af4029f2d6
commit
2972f837fc
@ -60,7 +60,6 @@ AppItem::AppItem(const QGSettings *appSettings, const QGSettings *activeAppSetti
|
||||
, m_drag(nullptr)
|
||||
, m_dragging(false)
|
||||
, m_retryTimes(0)
|
||||
, m_lastShowDay(0)
|
||||
, m_iconValid(false)
|
||||
, m_lastclickTimes(0)
|
||||
, m_appIcon(QPixmap())
|
||||
@ -116,10 +115,10 @@ AppItem::AppItem(const QGSettings *appSettings, const QGSettings *activeAppSetti
|
||||
|
||||
connect(DGuiApplicationHelper::instance(), &DGuiApplicationHelper::themeTypeChanged, this, &AppItem::onThemeTypeChanged);
|
||||
|
||||
/** 日历 1S定时判断是否刷新icon的处理 */
|
||||
connect(m_refershIconTimer, &QTimer::timeout, this, [ = ]() {
|
||||
m_curDate = QDate::currentDate();
|
||||
if (m_curDate.day() != m_lastShowDay) {
|
||||
m_lastShowDay = m_curDate.day();
|
||||
if (QDate::currentDate() != m_curDate) {
|
||||
m_curDate = QDate::currentDate();
|
||||
refreshIcon();
|
||||
}
|
||||
});
|
||||
|
@ -120,7 +120,6 @@ private:
|
||||
bool m_dragging;
|
||||
bool m_active;
|
||||
int m_retryTimes;
|
||||
int m_lastShowDay;
|
||||
bool m_iconValid;
|
||||
unsigned long m_lastclickTimes;
|
||||
|
||||
@ -134,9 +133,9 @@ private:
|
||||
|
||||
QTimer *m_updateIconGeometryTimer;
|
||||
QTimer *m_retryObtainIconTimer;
|
||||
QTimer *m_refershIconTimer;
|
||||
QTimer *m_refershIconTimer; // 当APP为日历时定时(1S)检测是否刷新ICON
|
||||
|
||||
QDate m_curDate;
|
||||
QDate m_curDate; // 保存当前icon的日期来判断是否需要更新日历APP的ICON
|
||||
|
||||
QFutureWatcher<QPixmap> *m_smallWatcher;
|
||||
QFutureWatcher<QPixmap> *m_largeWatcher;
|
||||
|
Loading…
x
Reference in New Issue
Block a user