Skip to content

Commit

Permalink
Merge pull request #9 from nextcloud/theming-invert-icon
Browse files Browse the repository at this point in the history
Switch notification icon to dark if theming app is using bright colors
  • Loading branch information
schiessle authored Aug 10, 2016
2 parents cdbbd16 + 0b0340b commit a918c4e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions img/notifications-new-dark.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 7 additions & 1 deletion js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -289,8 +289,14 @@
*/
_onHaveNotifications: function() {
// Add the button, title, etc
var icon;
if (OCA.Theming && OCA.Theming.inverted) {
icon = 'notifications-new-dark';
} else {
icon = 'notifications-new';
}
this.$button.addClass('hasNotifications');
this.$button.find('img').attr('src', OC.imagePath('notifications', 'notifications-new'))
this.$button.find('img').attr('src', OC.imagePath('notifications', icon))
.animate({opacity: 0.5}, 600)
.animate({opacity: 1}, 600)
.animate({opacity: 0.5}, 600)
Expand Down

0 comments on commit a918c4e

Please sign in to comment.