Bug 1329704. Add os-specific styles for webcompat-reporter lightbulb icon. draft
authorMike Taylor <miket@mozilla.com>
Mon, 06 Mar 2017 19:23:09 -0600
changeset 494310 327950fb95a8dd70f25a181649d0eba04cf91541
parent 494309 514cf35daa7eab6d270386da7c5cf320043c8c21
child 548081 a155ff790be8f6f50883aff10b491936618bdca2
push id48012
push userbmo:miket@mozilla.com
push dateTue, 07 Mar 2017 01:27:08 +0000
bugs1329704
milestone54.0a1
Bug 1329704. Add os-specific styles for webcompat-reporter lightbulb icon. MozReview-Commit-ID: JurBy0UTR1b
browser/extensions/webcompat-reporter/jar.mn
browser/extensions/webcompat-reporter/skin/lightbulb.css
browser/extensions/webcompat-reporter/skin/lightbulb.svg
browser/extensions/webcompat-reporter/skin/linux/lightbulb.css
browser/extensions/webcompat-reporter/skin/mac/lightbulb.css
browser/extensions/webcompat-reporter/skin/shared/lightbulb.css
browser/extensions/webcompat-reporter/skin/shared/lightbulb.svg
browser/extensions/webcompat-reporter/skin/windows/lightbulb.css
--- a/browser/extensions/webcompat-reporter/jar.mn
+++ b/browser/extensions/webcompat-reporter/jar.mn
@@ -1,13 +1,20 @@
 # 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/.
 
 [features/webcompat-reporter@mozilla.org] chrome.jar:
 % content webcompat-reporter %content/
-% skin webcompat-reporter classic/1.0 %skin/
-  content/              (content/*)
-  skin/lightbulb.css    (skin/lightbulb.css)
-* skin/lightbulb.svg    (skin/lightbulb.svg)
-  skin/linux/           (skin/linux/*)
-  skin/mac/             (skin/mac/*)
-  skin/windows/         (skin/windows/*)
+  content/ (content/*)
+% skin webcompat-reporter classic/1.0 %skin/linux/
+% skin webcompat-reporter classic/1.0 %skin/mac/ os=Darwin
+% skin webcompat-reporter classic/1.0 %skin/windows/ os=WINNT
+% skin webcompat-reporter-shared classic/1.0 %skin/shared/
+* skin/shared/lightbulb.svg (skin/shared/lightbulb.svg)
+# osx overrides
+% override chrome://webcompat-reporter/skin/lightbulb.png    chrome://webcompat-reporter/skin/lightbulb-yosemite.png    os=Darwin osversion>=10.10
+% override chrome://webcompat-reporter/skin/lightbulb@2x.png chrome://webcompat-reporter/skin/lightbulb-yosemite@2x.png os=Darwin osversion>=10.10
+# windows overrides
+% override chrome://webcompat-reporter/skin/lightbulb.png    chrome://webcompat-reporter/skin/lightbulb-win7.png        os=WINNT osversion=6.1
+% override chrome://webcompat-reporter/skin/lightbulb@2x.png chrome://webcompat-reporter/skin/lightbulb-win7@2x.png     os=WINNT osversion=6.1
+% override chrome://webcompat-reporter/skin/lightbulb.png    chrome://webcompat-reporter/skin/lightbulb-win8.png        os=WINNT osversion=6.2
+% override chrome://webcompat-reporter/skin/lightbulb@2x.png chrome://webcompat-reporter/skin/lightbulb-win8@2x.png     os=WINNT osversion=6.2
--- a/browser/extensions/webcompat-reporter/skin/lightbulb.css
+++ b/browser/extensions/webcompat-reporter/skin/lightbulb.css
@@ -1,6 +1,6 @@
 /* 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/. */
-#webcompat-reporter-button {
+#webcompat-reporter-button[cui-areatype="menu-panel"] {
   list-style-image: url("chrome://webcompat-reporter/skin/lightbulb.svg");
 }
deleted file mode 100644
--- a/browser/extensions/webcompat-reporter/skin/lightbulb.svg
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version="1.0"?>
-<!-- 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/. -->
-<svg xmlns="http://www.w3.org/2000/svg"
-     width="32" height="32" viewBox="0 0 32 32"
-     class="fieldtext">
-#include ../../../../browser/themes/shared/icon-colors.inc.svg
-
-  <path d="M11.5,8.3h.1l9-1a.8.8,0,0,0-.2-1.5l-9,1a.8.8,0,0,0,.1,1.5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/lightbulb.css
@@ -0,0 +1,4 @@
+/* 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://webcompat-reporter-shared/skin/lightbulb.css");
new file mode 100644
--- /dev/null
+++ b/browser/extensions/webcompat-reporter/skin/mac/lightbulb.css
@@ -0,0 +1,4 @@
+/* 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://webcompat-reporter-shared/skin/lightbulb.css");
new file mode 100644
--- /dev/null
+++ b/browser/extensions/webcompat-reporter/skin/shared/lightbulb.css
@@ -0,0 +1,26 @@
+/* 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/. */
+#webcompat-reporter-button[cui-areatype="menu-panel"] {
+  list-style-image: url("chrome://webcompat-reporter-shared/skin/lightbulb.svg");
+}
+
+#webcompat-reporter-button[cui-areatype="toolbar"] {
+  list-style-image: url("chrome://webcompat-reporter/skin/lightbulb.png");
+  -moz-image-region: rect(0, 18px, 18px, 0);
+}
+
+toolbar[brighttext] #webcompat-reporter-button {
+ list-style-image: url("chrome://webcompat-reporter/skin/lightbulb-inverted.png");
+}
+
+@media (min-resolution: 1.1dppx) {
+  #webcompat-reporter-button[cui-areatype="toolbar"] {
+    list-style-image: url("chrome://webcompat-reporter/skin/lightbulb@2x.png");
+    -moz-image-region: rect(0, 36px, 36px, 0px);
+  }
+
+  toolbar[brighttext] #webcompat-reporter-button {
+    list-style-image: url("chrome://webcompat-reporter/skin/lightbulb-inverted@2x.png");
+  }
+}
new file mode 100644
--- /dev/null
+++ b/browser/extensions/webcompat-reporter/skin/shared/lightbulb.svg
@@ -0,0 +1,11 @@
+<?xml version="1.0"?>
+<!-- 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/. -->
+<svg xmlns="http://www.w3.org/2000/svg"
+     width="32" height="32" viewBox="0 0 32 32"
+     class="fieldtext">
+#include ../../../../../browser/themes/shared/icon-colors.inc.svg
+
+  <path d="M11.5,8.3h.1l9-1a.8.8,0,0,0-.2-1.5l-9,1a.8.8,0,0,0,.1,1.5Zm2.4,13.5a.3.3,0,0,0,.1.2h.9a.3.3,0,0,0,.1-.2,1.8,1.8,0,0,0-.5-1.1A1.8,1.8,0,0,0,13.9,21.7ZM11.5,6.3h.1l8-1a.7.7,0,0,0,.7-.8.7.7,0,0,0-.3-.5A4.4,4.4,0,0,0,16,1c-3,0-4,3-4,3h5.5l-6,.8a.7.7,0,0,0,.1,1.5ZM17,21.8c0,.1,0,.3.5.3h.4a.4.4,0,0,0,.1-.3,1.8,1.8,0,0,0-.4-1A1.9,1.9,0,0,0,17,21.8Zm5.3-8.9-1.1-2.2a1,1,0,0,0-.9-.6H13.8l6.8-.8a.8.8,0,0,0-.2-1.5l-9,1a.8.8,0,0,0-.7.8.7.7,0,0,0,.4.6l-.4.5L9.7,12.8C8.5,15,6,17,6,21.5A9.6,9.6,0,0,0,16,31a9.6,9.6,0,0,0,10-9.5C26,17,23.5,15,22.3,12.8Zm0,7.7a.5.5,0,0,1-.6,0,3.8,3.8,0,0,0-2.2-.8l-1.1.3a2.7,2.7,0,0,1,.6,1.6,1.4,1.4,0,0,1-.4,1,1.6,1.6,0,0,1-1.1.4A1.3,1.3,0,0,1,16,21.8a2.8,2.8,0,0,1,.8-1.8,1.8,1.8,0,0,0-1.7,0,2.8,2.8,0,0,1,.7,1.7,1.3,1.3,0,0,1-.4.9,1.5,1.5,0,0,1-1,.4,1.8,1.8,0,0,1-1.2-.4,1.3,1.3,0,0,1-.4-1,2.7,2.7,0,0,1,.7-1.7,2.5,2.5,0,0,0-1.2-.3,3.8,3.8,0,0,0-2.1.7.5.5,0,0,1-.7-.6l4.6-8.5a.5.5,0,1,1,.9.5l-3.9,7.2,1.2-.2a3.6,3.6,0,0,1,2,.6,2.8,2.8,0,0,1,3.3,0,3.5,3.5,0,0,1,1.9-.5l1.3.2L17,11.8a.5.5,0,1,1,.9-.5l4.5,8.6A.5.5,0,0,1,22.3,20.6Z"/>
+</svg>
new file mode 100644
--- /dev/null
+++ b/browser/extensions/webcompat-reporter/skin/windows/lightbulb.css
@@ -0,0 +1,4 @@
+/* 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://webcompat-reporter-shared/skin/lightbulb.css");