Bug 1502616 - Fix our nav-button after removing the header-button class in bug 1502054. r=jorgk
authorRichard Marti <richard.marti@gmail.com>
Sat, 27 Oct 2018 14:02:16 +0200
changeset 33602 41cd1f527410813bb22fdc7a9e4f5f4a1b2ba761
parent 33601 7a29a83fb1abaeab73083156ebf74f979431be0a
child 33603 50bc86d0ddd6bd672deff8dc08da21c992a17ab1
push id388
push userclokep@gmail.com
push dateMon, 28 Jan 2019 20:54:56 +0000
reviewersjorgk
bugs1502616, 1502054
Bug 1502616 - Fix our nav-button after removing the header-button class in bug 1502054. r=jorgk
mail/base/content/aboutAddonsExtra.js
mail/themes/shared/mail/extensionsOverlay.css
--- a/mail/base/content/aboutAddonsExtra.js
+++ b/mail/base/content/aboutAddonsExtra.js
@@ -20,24 +20,24 @@ gStrings.mailExt =
   // Add navigation buttons for back and forward on the addons page.
   let hbox = document.createElement("hbox");
   hbox.setAttribute("id", "nav-header");
   hbox.setAttribute("align", "center");
   hbox.setAttribute("pack", "center");
 
   let backButton = document.createElement("toolbarbutton");
   backButton.setAttribute("id", "back-btn");
-  backButton.setAttribute("class", "nav-button header-button");
+  backButton.setAttribute("class", "nav-button");
   backButton.setAttribute("command", "cmd_back");
   backButton.setAttribute("tooltiptext", gStrings.mailExt.GetStringFromName("cmdBackTooltip"));
   backButton.setAttribute("disabled", "true");
 
   let forwardButton = document.createElement("toolbarbutton");
   forwardButton.setAttribute("id", "forward-btn");
-  forwardButton.setAttribute("class", "nav-button header-button");
+  forwardButton.setAttribute("class", "nav-button");
   forwardButton.setAttribute("command", "cmd_forward");
   forwardButton.setAttribute("tooltiptext", gStrings.mailExt.GetStringFromName("cmdForwardTooltip"));
   forwardButton.setAttribute("disabled", "true");
   hbox.appendChild(backButton);
   hbox.appendChild(forwardButton);
 
   document.getElementById("category-box")
           .insertBefore(hbox, document.getElementById("categories"));
--- a/mail/themes/shared/mail/extensionsOverlay.css
+++ b/mail/themes/shared/mail/extensionsOverlay.css
@@ -3,24 +3,39 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #nav-header,
 #category-box {
   background-color: #ebebef;
 }
 
 .nav-button {
+  -moz-appearance: none;
   list-style-image: url(chrome://messenger/skin/icons/navigation.svg);
   margin-top: 15px;
   margin-bottom: 10px;
-  border-color: transparent;
+  border: 1px solid transparent;
+  border-radius: 2px;
   -moz-context-properties: fill;
   fill: currentColor;
 }
 
+.nav-button[disabled="true"] > .toolbarbutton-icon {
+  opacity: 0.4;
+}
+
+.nav-button:not([disabled="true"]):hover {
+  background-color: #bebebe;
+  cursor: pointer;
+}
+
+.nav-button > .toolbarbutton-text {
+  display: none;
+}
+
 #back-btn:-moz-locale-dir(rtl),
 #forward-btn:-moz-locale-dir(ltr) {
   transform: scaleX(-1);
 }
 
 #categories {
   padding-top: 0;
 }