Bug 1559272 - Apply the systemcolors attribute to the Event dialog too. r=philipp
authorRichard Marti <richard.marti@gmail.com>
Sat, 15 Jun 2019 12:03:44 +0200
changeset 35945 4cdda25ab4a73879c53125cadb81525ade52e002
parent 35944 ccd0d7d9d7e5607ea870babbd815d7aebda84e4c
child 35946 e0cb4807daeec4bf9d7517e09623da43f1a87299
push id392
push userclokep@gmail.com
push dateMon, 02 Sep 2019 20:17:19 +0000
reviewersphilipp
bugs1559272
Bug 1559272 - Apply the systemcolors attribute to the Event dialog too. r=philipp
calendar/lightning/content/lightning-item-iframe.js
--- a/calendar/lightning/content/lightning-item-iframe.js
+++ b/calendar/lightning/content/lightning-item-iframe.js
@@ -421,16 +421,21 @@ function onLoad() {
     // function that does this.
     if (!gInTab) {
         document.documentElement._hitEnter = function() {};
     }
 
     // set up our calendar event observer
     eventDialogCalendarObserver.observe(item.calendar);
 
+    // Check if the systemcolor pref is set.
+    if (Services.prefs.getBoolPref("calendar.view.useSystemColors")) {
+        document.documentElement.setAttribute("systemcolors", "true");
+    }
+
     onLoad.hasLoaded = true;
 }
 // Set a variable to allow or prevent actions before the dialog is done loading.
 onLoad.hasLoaded = false;
 
 function onEventDialogUnload() {
     Services.obs.removeObserver(eventDialogQuitObserver,
                                 "quit-application-requested");