Recover orientation of tray icon animation

This commit is contained in:
chenlelin 2021-04-30 10:18:46 +08:00
parent 9e5b1ff638
commit 91e558dcce
2 changed files with 15 additions and 15 deletions

View File

@ -50,10 +50,10 @@ void LoadingDiv::switchAnimStep()
loadingGif->setProperty("useIconHighlightEffect", true);
loadingGif->setProperty("iconHighlightEffectMode", true);
this->currentPage --;
this->currentPage ++;
if (this->currentPage < 1) {
this->currentPage = 12; //循环播放
if (this->currentPage > 12) {
this->currentPage = 1; //循环播放
}
this->countCurrentTime += FRAMESPEED;
if (this->countCurrentTime >= ALLTIME) {
@ -64,7 +64,7 @@ void LoadingDiv::switchAnimStep()
//开始播放动画
void LoadingDiv::startLoading()
{
this->currentPage = 12;
this->currentPage = 1;
this->countCurrentTime = 0;
this->switchTimer->start(FRAMESPEED);
this->show();

View File

@ -618,18 +618,18 @@ void MainWindow::createTrayIcon()
iconWifiMedium = QIcon::fromTheme("network-wireless-signal-ok");
iconWifiLow = QIcon::fromTheme("network-wireless-signal-low");
loadIcons.append(QIcon::fromTheme("kylin-network-12"));
loadIcons.append(QIcon::fromTheme("kylin-network-11"));
loadIcons.append(QIcon::fromTheme("kylin-network-10"));
loadIcons.append(QIcon::fromTheme("kylin-network-9"));
loadIcons.append(QIcon::fromTheme("kylin-network-8"));
loadIcons.append(QIcon::fromTheme("kylin-network-7"));
loadIcons.append(QIcon::fromTheme("kylin-network-6"));
loadIcons.append(QIcon::fromTheme("kylin-network-5"));
loadIcons.append(QIcon::fromTheme("kylin-network-4"));
loadIcons.append(QIcon::fromTheme("kylin-network-3"));
loadIcons.append(QIcon::fromTheme("kylin-network-2"));
loadIcons.append(QIcon::fromTheme("kylin-network-1"));
loadIcons.append(QIcon::fromTheme("kylin-network-2"));
loadIcons.append(QIcon::fromTheme("kylin-network-3"));
loadIcons.append(QIcon::fromTheme("kylin-network-4"));
loadIcons.append(QIcon::fromTheme("kylin-network-5"));
loadIcons.append(QIcon::fromTheme("kylin-network-6"));
loadIcons.append(QIcon::fromTheme("kylin-network-7"));
loadIcons.append(QIcon::fromTheme("kylin-network-8"));
loadIcons.append(QIcon::fromTheme("kylin-network-9"));
loadIcons.append(QIcon::fromTheme("kylin-network-10"));
loadIcons.append(QIcon::fromTheme("kylin-network-11"));
loadIcons.append(QIcon::fromTheme("kylin-network-12"));
iconTimer = new QTimer(this);
connect(iconTimer, SIGNAL(timeout()), this, SLOT(iconStep()));