From 0b0340b41dec97661f0e5b36b3a1152d6a562575 Mon Sep 17 00:00:00 2001 From: Julius Haertl Date: Wed, 10 Aug 2016 03:19:02 +0200 Subject: [PATCH] Switch notification icon to dark if theming app is using bright colors --- img/notifications-new-dark.svg | 1 + js/app.js | 8 +++++++- 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 img/notifications-new-dark.svg diff --git a/img/notifications-new-dark.svg b/img/notifications-new-dark.svg new file mode 100644 index 000000000..bc00d61f7 --- /dev/null +++ b/img/notifications-new-dark.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/js/app.js b/js/app.js index 3f2412fb1..d91967d0b 100644 --- a/js/app.js +++ b/js/app.js @@ -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)