Bug 1290696 - Don't use HighlightText on focused/selected treechildrens under Windows default theme. r=MakeMyDay;a=Philipp
authorRichard Marti <richard.marti@gmail.com>
Sun, 31 Jul 2016 20:32:42 +0200
changeset 27370 555845fa3750c03c5c7dc90c8fbfa0ac65f5c2c2
parent 27369 0f6724873dc9f6e2fa80a202ecf6045f4ed37679
child 27371 f392635ba8883345195b4584724dab01c5e08d53
push id1850
push userclokep@gmail.com
push dateWed, 08 Mar 2017 19:29:12 +0000
treeherdercomm-esr52@028df196b2d9 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersMakeMyDay, Philipp
bugs1290696
Bug 1290696 - Don't use HighlightText on focused/selected treechildrens under Windows default theme. r=MakeMyDay;a=Philipp
calendar/base/themes/common/calendar-task-tree.css
calendar/base/themes/windows/calendar-task-tree.css
--- a/calendar/base/themes/common/calendar-task-tree.css
+++ b/calendar/base/themes/common/calendar-task-tree.css
@@ -5,16 +5,22 @@
 .calendar-task-tree {
     -moz-appearance: none;
     background-color: -moz-Field;
     color: -moz-FieldText;
     border: 0;
     margin: 0;
 }
 
+/* align the treechildren text */
+.calendar-task-tree > treechildren::-moz-tree-cell-text {
+    margin-top: 1px;
+    margin-bottom: 1px;
+}
+
 .calendar-task-tree > treechildren::-moz-tree-row(selected, focus) {
     background-color: Highlight;
 }
 
 .calendar-task-tree > treechildren::-moz-tree-cell-text(selected, focus) {
     color: HighlightText;
 }
 
--- a/calendar/base/themes/windows/calendar-task-tree.css
+++ b/calendar/base/themes/windows/calendar-task-tree.css
@@ -17,8 +17,64 @@
     list-style-image: url(chrome://calendar/skin/checkbox-images.png);
     -moz-image-region: rect(0 13px 13px 0);
 }
 
 .calendar-task-tree > treechildren::-moz-tree-image(calendar-task-tree-col-completed, repeating) {
     list-style-image: url(chrome://calendar/skin/checkbox-images.png);
     -moz-image-region: rect(0 39px 13px 26px);
 }
+
+/* Use on Vista and up default theme a dark text color when selected focus */
+@media not all and (-moz-os-version: windows-xp) {
+    @media (-moz-windows-default-theme) {
+        .calendar-task-tree > treechildren::-moz-tree-cell-text(selected, focus),
+        .calendar-task-tree > treechildren::-moz-tree-cell-text(duetoday, selected, focus),
+        .calendar-task-tree > treechildren::-moz-tree-cell-text(future, selected, focus),
+        .calendar-task-tree > treechildren::-moz-tree-cell-text(completed, selected, focus) {
+            color: -moz-FieldText;
+        }
+
+        .calendar-task-tree > treechildren::-moz-tree-row(inprogress, selected, focus) {
+            -moz-border-top-colors: green rgba(255, 255, 255, .4);
+            -moz-border-right-colors: green rgba(255, 255, 255, .4);
+            -moz-border-left-colors: green rgba(255, 255, 255, .4);
+            -moz-border-bottom-colors: green rgba(255, 255, 255, .6);
+        }
+
+        .calendar-task-tree > treechildren::-moz-tree-cell-text(inprogress, selected, focus) {
+            color: white;
+        }
+
+        .calendar-task-tree > treechildren::-moz-tree-row(overdue, selected, focus) {
+            -moz-border-top-colors: red rgba(255, 255, 255, .4);
+            -moz-border-right-colors: red rgba(255, 255, 255, .4);
+            -moz-border-left-colors: red rgba(255, 255, 255, .4);
+            -moz-border-bottom-colors: red rgba(255, 255, 255, .6);
+        }
+
+        .calendar-task-tree > treechildren::-moz-tree-cell-text(overdue, selected, focus) {
+            color: white;
+        }
+
+        @media (-moz-os-version: windows-vista),
+               (-moz-os-version: windows-win7) {
+            .calendar-task-tree > treechildren::-moz-tree-row(inprogress, selected, focus) {
+                background: linear-gradient(rgba(0, 128, 0, .28), rgba(0, 128, 0, .5));
+            }
+
+            .calendar-task-tree > treechildren::-moz-tree-row(overdue, selected, focus) {
+                background: linear-gradient(rgba(255, 0, 0, .28), rgba(255, 0, 0, .5));
+            }
+        }
+
+        @media (-moz-os-version: windows-win8),
+               (-moz-os-version: windows-win10) {
+            .calendar-task-tree > treechildren::-moz-tree-row(inprogress, selected, focus) {
+                background: linear-gradient(rgba(0, 128, 0, .5), rgba(0, 128, 0, .5));
+            }
+
+            .calendar-task-tree > treechildren::-moz-tree-row(overdue, selected, focus) {
+                background: linear-gradient(rgba(255, 0, 0, .5), rgba(255, 0, 0, .5));
+            }
+        }
+    }
+}