Skip to content

Commit

Permalink
Updater: Notification uses accent color when update available
Browse files Browse the repository at this point in the history
Now the small notification icon uses the accent color if an update
is available, so that it is visually distinct from a "ongoing check"
notification.

Also, clicking on the notification icon will dismiss it unless a
download is in progress.
  • Loading branch information
skyjake committed Oct 7, 2013
1 parent 9f892e6 commit 6893283
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion doomsday/client/src/updater/updater.cpp
Expand Up @@ -273,9 +273,16 @@ DENG2_OBSERVES(App, StartupComplete)
status->setRange(Rangei(0, 1));
status->setProgress(0, 0);
status->setImage(ClientApp::windowSystem().style().images().image("updater"));
status->setImageColor(ClientApp::windowSystem().style().colors().colorf("text"));
showNotification(true);
}

void showUpdateAvailableNotification()
{
showCheckingNotification();
status->setImageColor(ClientApp::windowSystem().style().colors().colorf("accent"));
}

void showDownloadNotification()
{
status->setMode(ProgressWidget::Indefinite);
Expand Down Expand Up @@ -357,7 +364,7 @@ DENG2_OBSERVES(App, StartupComplete)

// Show the notification so the user knows an update is
// available.
showCheckingNotification();
showUpdateAvailableNotification();
}
}
else
Expand Down Expand Up @@ -612,6 +619,7 @@ void Updater::showCurrentDownload()
}
else
{
d->showNotification(false);
d->showAvailableDialogAndPause();
}
}
Expand Down

0 comments on commit 6893283

Please sign in to comment.