Bug 1629515 - Make the QuickFilterBar themeable. r=aleca
authorRichard Marti <richard.marti@gmail.com>
Mon, 13 Apr 2020 20:16:23 +0200
changeset 38817 fd4e26bf3a424d60dd0f68bb7a42cf221933a5ee
parent 38816 f264f42383a7c68be86d32c4cb1c49f43ede833f
child 38818 5d4c12618d3f4c82b4c3678de117defd2ef0c9c3
push id401
push userclokep@gmail.com
push dateMon, 01 Jun 2020 20:41:59 +0000
reviewersaleca
bugs1629515
Bug 1629515 - Make the QuickFilterBar themeable. r=aleca
mail/themes/linux/mail/compacttheme.css
mail/themes/linux/mail/quickFilterBar.css
mail/themes/osx/mail/compacttheme.css
mail/themes/osx/mail/quickFilterBar.css
mail/themes/shared/mail/compacttheme.css
mail/themes/shared/mail/mailWindow1.css
mail/themes/windows/mail/compacttheme.css
mail/themes/windows/mail/quickFilterBar.css
--- a/mail/themes/linux/mail/compacttheme.css
+++ b/mail/themes/linux/mail/compacttheme.css
@@ -1,19 +1,14 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 @import url("chrome://messenger/skin/shared/compacttheme.css");
 
-/* Quick-Filter-Bar */
-#quick-filter-bar {
-  border-bottom-color: var(--chrome-content-separator-color);
-}
-
 #MsgHeadersToolbar {
   background-image: none;
 }
 
 #headers-box {
   -moz-appearance: none;
 }
 
--- a/mail/themes/linux/mail/quickFilterBar.css
+++ b/mail/themes/linux/mail/quickFilterBar.css
@@ -25,17 +25,17 @@
 }
 
 #quick-filter-bar-filter-text-bar {
   padding-inline-end: 4px;
 }
 
 /* Style for the default system dark theme */
 
-:root[lwt-default-theme-in-dark-mode] #quick-filter-bar-expando {
+:root[lwt-tree] #quick-filter-bar-expando {
   border-bottom-color: var(--chrome-content-separator-color);
 }
 
 /* :::: Filter Buttons :::: */
 
 #quick-filter-bar toolbarbutton {
   margin-right: 1px;
   margin-left: 1px;
--- a/mail/themes/osx/mail/compacttheme.css
+++ b/mail/themes/osx/mail/compacttheme.css
@@ -17,26 +17,16 @@
   text-shadow: none;
 }
 
 #tabs-toolbar:-moz-lwtheme-darktext {
   -moz-appearance: -moz-mac-vibrant-titlebar-light;
   -moz-font-smoothing-background-color: -moz-mac-vibrant-titlebar-light;
 }
 
-/* Quick-Filter-Bar */
-#quick-filter-bar-main-bar:-moz-lwtheme {
-  background: transparent;
-}
-
-#quick-filter-bar-expando:-moz-lwtheme {
-  border-bottom-color: var(--chrome-content-separator-color);
-  background: transparent;
-}
-
 #headers-box {
   -moz-appearance: none;
 }
 
 #FormatToolbar {
   background-image: none;
   background-color: transparent !important;
 }
--- a/mail/themes/osx/mail/quickFilterBar.css
+++ b/mail/themes/osx/mail/quickFilterBar.css
@@ -37,21 +37,21 @@
 
 #qfb-filter-label {
   color: #888;
   font-weight: bold;
 }
 
 /* Styles for the default system dark theme */
 
-:root[lwt-default-theme-in-dark-mode] #quick-filter-bar-main-bar:-moz-lwtheme {
+:root[lwt-tree] #quick-filter-bar-main-bar:-moz-lwtheme {
   background: transparent;
 }
 
-:root[lwt-default-theme-in-dark-mode] #quick-filter-bar-expando:-moz-lwtheme {
+:root[lwt-tree] #quick-filter-bar-expando:-moz-lwtheme {
   border-bottom-color: var(--chrome-content-separator-color);
   background: transparent;
 }
 
 /* :::: Filter Buttons :::: */
 
 #quick-filter-bar toolbarbutton {
   height: 16px;
--- a/mail/themes/shared/mail/compacttheme.css
+++ b/mail/themes/shared/mail/compacttheme.css
@@ -49,55 +49,16 @@
 .editContactTextbox {
   background-color: var(--lwt-toolbar-field-background-color);
   color: var(--lwt-toolbar-field-color);
 }
 .editContactTextbox:not([readonly]):not(:focus) {
   border-color: var(--panel-separator-color);
 }
 
-/* Quick-Filter-Bar */
-#quick-filter-bar:-moz-lwtheme {
-  background-color: var(--lwt-accent-color);
-  color: var(--lwt-text-color);
-}
-#quick-filter-bar:-moz-lwtheme-brighttext {
-  --toolbarbutton-hover-background: var(--lwt-toolbarbutton-hover-background);
-  --toolbarbutton-hover-bordercolor: var(--lwt-toolbarbutton-hover-background);
-
-  --toolbarbutton-checkedhover-backgroundcolor: var(--lwt-toolbarbutton-hover-background);
-
-  --toolbarbutton-active-background: var(--lwt-toolbarbutton-active-background);
-  --toolbarbutton-active-bordercolor: var(--lwt-toolbarbutton-active-background);
-  --toolbarbutton-active-boxshadow: 0 0 0 1px var(--lwt-toolbarbutton-active-background) inset;
-}
-
-#qfb-qs-textbox:-moz-lwtheme {
-  background-color: var(--lwt-toolbar-field-background-color, hsla(0,0%,100%,.8));
-  color: var(--lwt-toolbar-field-color, black);
-}
-
-#qfb-qs-textbox:not([focused="true"]):-moz-lwtheme {
-  border-color: var(--lwt-toolbar-field-border-color, hsla(240,5%,5%,.25));
-}
-
-#qfb-qs-textbox:-moz-lwtheme:hover {
-  background-color: var(--lwt-toolbar-field-background-color, white);
-}
-
-#qfb-qs-textbox:-moz-lwtheme-brighttext:hover {
-  box-shadow: 0 1px 3px rgba(255,255,255,.15);
-}
-
-#qfb-qs-textbox:-moz-lwtheme[focused="true"] {
-  background-color: var(--lwt-toolbar-field-focus, var(--lwt-toolbar-field-background-color, white));
-  color: var(--lwt-toolbar-field-focus-color, var(--lwt-toolbar-field-color, black));
-  border-color: var(--toolbar-field-focus-border-color);
-}
-
 /* Composer header box styling */
 #headers-box:-moz-lwtheme-brighttext {
   --toolbarbutton-hover-background: var(--lwt-toolbarbutton-hover-background);
   --toolbarbutton-hover-bordercolor: var(--lwt-toolbarbutton-hover-background);
 
   --toolbarbutton-active-background: var(--lwt-toolbarbutton-active-background);
   --toolbarbutton-active-bordercolor: var(--lwt-toolbarbutton-active-background);
   --toolbarbutton-active-boxshadow: 0 0 0 1px var(--lwt-toolbarbutton-active-background) inset;
--- a/mail/themes/shared/mail/mailWindow1.css
+++ b/mail/themes/shared/mail/mailWindow1.css
@@ -131,8 +131,48 @@ treechildren::-moz-tree-image(correspond
   background-color: -moz-Field;
 }
 
 @media (prefers-color-scheme: dark) {
   #messagepanewrapper {
     background-color: #2a2a2e;
   }
 }
+
+/* Quick-Filter-Bar */
+:root[lwt-tree] #quick-filter-bar:-moz-lwtheme {
+  background-color: var(--lwt-accent-color);
+  color: var(--lwt-text-color);
+}
+
+:root[lwt-tree-brighttext] #quick-filter-bar {
+  --toolbarbutton-hover-background: var(--lwt-toolbarbutton-hover-background);
+  --toolbarbutton-hover-bordercolor: var(--lwt-toolbarbutton-hover-background);
+
+  --toolbarbutton-checkedhover-backgroundcolor: var(--lwt-toolbarbutton-hover-background);
+
+  --toolbarbutton-active-background: var(--lwt-toolbarbutton-active-background);
+  --toolbarbutton-active-bordercolor: var(--lwt-toolbarbutton-active-background);
+  --toolbarbutton-active-boxshadow: 0 0 0 1px var(--lwt-toolbarbutton-active-background) inset;
+}
+
+:root[lwt-tree] #qfb-qs-textbox {
+  background-color: var(--lwt-toolbar-field-background-color, hsla(0, 0%, 100%, .8));
+  color: var(--lwt-toolbar-field-color, black);
+}
+
+:root[lwt-tree] #qfb-qs-textbox:not([focused="true"]) {
+  border-color: var(--lwt-toolbar-field-border-color, hsla(240, 5%, 5%, .25));
+}
+
+:root[lwt-tree] #qfb-qs-textbox:hover {
+  background-color: var(--lwt-toolbar-field-background-color, white);
+}
+
+:root[lwt-tree-brighttext] #qfb-qs-textbox:hover {
+  box-shadow: 0 1px 3px rgba(255, 255, 255, .15);
+}
+
+:root[lwt-tree] #qfb-qs-textbox[focused="true"] {
+  background-color: var(--lwt-toolbar-field-focus, var(--lwt-toolbar-field-background-color, white));
+  color: var(--lwt-toolbar-field-focus-color, var(--lwt-toolbar-field-color, black));
+  border-color: var(--toolbar-field-focus-border-color);
+}
--- a/mail/themes/windows/mail/compacttheme.css
+++ b/mail/themes/windows/mail/compacttheme.css
@@ -165,13 +165,8 @@
  * over the native border with our custom borders: */
 #navigator-toolbox {
   /* These are !important to avoid specificity-wars with the selectors that add borders here. */
   background-image: none !important;
   border-top: none !important;
   box-shadow: none !important;
   padding-top: 0 !important;
 }
-
-/* Quick-Filter-Bar */
-#quick-filter-bar-expando {
-  border-bottom-color: var(--chrome-content-separator-color);
-}
--- a/mail/themes/windows/mail/quickFilterBar.css
+++ b/mail/themes/windows/mail/quickFilterBar.css
@@ -50,17 +50,17 @@
   #quick-filter-bar-filter-text-bar {
     padding-top: 3px;
     padding-bottom: 3px;
   }
 }
 
 /* Style for the default system dark theme */
 
-:root[lwt-default-theme-in-dark-mode] #quick-filter-bar-expando {
+:root[lwt-tree] #quick-filter-bar-expando {
   border-bottom-color: var(--chrome-content-separator-color);
 }
 
 /* :::: Filter Buttons :::: */
 
 #quick-filter-bar toolbarbutton {
   min-height: 19px;
   border: 1px solid transparent;