Bug 1196266 - Use Windows 10 accent color in the title bar when in the foreground. r?johannh draft
authorDão Gottwald <dao@mozilla.com>
Thu, 06 Jul 2017 09:57:45 +0200
changeset 604645 48a1e0337c348182185e82dec3bfe98bdd0258d0
parent 604481 af0466865a212c84fbbab343c9cbb984c6132920
child 636253 c6100816b761a514d45b66156cf86503866e735f
push id67146
push userdgottwald@mozilla.com
push dateThu, 06 Jul 2017 07:58:12 +0000
reviewersjohannh
bugs1196266
milestone56.0a1
Bug 1196266 - Use Windows 10 accent color in the title bar when in the foreground. r?johannh MozReview-Commit-ID: EYA1rgUUbOa
browser/themes/windows/browser-aero.css
browser/themes/windows/browser.css
--- a/browser/themes/windows/browser-aero.css
+++ b/browser/themes/windows/browser-aero.css
@@ -45,24 +45,33 @@
    * the titlebar */
   #browser {
     -moz-appearance: -moz-win-exclude-glass;
   }
 
   @media not all and (-moz-os-version: windows-win7) {
     @media not all and (-moz-os-version: windows-win8) {
       @media (-moz-windows-default-theme) {
-        :root:not(:-moz-lwtheme) {
 %ifdef MOZ_PHOTON_THEME
+        :root:not(:-moz-window-inactive):not(:-moz-lwtheme) {
           background-color: hsl(235,33%,19%);
           --titlebar-text-color: hsl(240,9%,98%);
+        }
+
+        @media (-moz-windows-accent-color-applies) {
+          :root:not(:-moz-window-inactive):not(:-moz-lwtheme) {
+            background-color: -moz-win-accentcolor;
+            --titlebar-text-color: -moz-win-accentcolortext;
+          }
+        }
 %else
+        :root:not(:-moz-lwtheme) {
           background-color: hsl(0, 0%, 78%);
+        }
 %endif
-        }
 
         :root[tabsintitlebar] .tab-label:-moz-window-inactive {
           /* Calculated to match the opacity change of Windows Explorer
              titlebar text change for inactive windows. */
           opacity: .6;
         }
       }
 
@@ -78,17 +87,17 @@
       }
 
       .titlebar-button {
         border: none;
         margin: 0 !important;
         padding: 10px 17px;
         -moz-context-properties: stroke;
 %ifdef MOZ_PHOTON_THEME
-        stroke: white;
+        stroke: var(--titlebar-text-color);
 %else
         stroke: black;
 %endif
       }
 
       :root[sizemode=maximized] .titlebar-button {
         padding-top: 8px;
         padding-bottom: 8px;
--- a/browser/themes/windows/browser.css
+++ b/browser/themes/windows/browser.css
@@ -10,17 +10,17 @@
 
 %include ../shared/browser.inc
 %include windowsShared.inc
 %define toolbarShadowColor hsla(209,67%,12%,0.35)
 
 %include ../shared/browser.inc.css
 
 :root {
-  --titlebar-text-color: inherit;
+  --titlebar-text-color: currentColor;
 
   --toolbarbutton-vertical-text-padding: calc(var(--toolbarbutton-inner-padding) - 1px);
 
 %ifdef MOZ_PHOTON_THEME
   --toolbarbutton-border-radius: 2px;
 %else
   --space-above-tabbar: 15px;