Bug 574137: move HUDService styling to toolkit/themes, avoid setting incorrect class names on toolbar buttons, and remove toolbar style rules that conflict with the browser styling, r=dao
authorGavin Sharp <gavin@gavinsharp.com>
Thu, 24 Jun 2010 20:16:35 -0400
changeset 46242 a119d5f462f2ec8eab362ec7fb701f7a68a41d01
parent 46241 ecbfb007043188ac858d7aa6b601b5e9bd8dc10f
child 46243 619563f026f52daf53443e376f1155c9be23d94f
push idunknown
push userunknown
push dateunknown
reviewersdao
bugs574137
milestone1.9.3a6pre
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 574137: move HUDService styling to toolkit/themes, avoid setting incorrect class names on toolbar buttons, and remove toolbar style rules that conflict with the browser styling, r=dao
toolkit/components/console/content/headsUpDisplay.css
toolkit/components/console/hudservice/HUDService.jsm
toolkit/components/console/jar.mn
toolkit/themes/pinstripe/global/headsUpDisplay.css
toolkit/themes/pinstripe/global/jar.mn
toolkit/themes/winstripe/global/headsUpDisplay.css
toolkit/themes/winstripe/global/jar.mn
--- a/toolkit/components/console/hudservice/HUDService.jsm
+++ b/toolkit/components/console/hudservice/HUDService.jsm
@@ -67,17 +67,17 @@ function LogFactory(aMessagePrefix)
   }
   return log;
 }
 
 let log = LogFactory("*** HUDService:");
 
 const ELEMENT_NS_URI = "http://www.w3.org/1999/xhtml";
 const ELEMENT_NS = "html:";
-const HUD_STYLESHEET_URI = "chrome://global/content/headsUpDisplay.css";
+const HUD_STYLESHEET_URI = "chrome://global/skin/headsUpDisplay.css";
 const HUD_STRINGS_URI = "chrome://global/locale/headsUpDisplay.properties";
 
 XPCOMUtils.defineLazyGetter(this, "stringBundle", function () {
   return Services.strings.createBundle(HUD_STRINGS_URI);
 });
 
 const ERRORS = { LOG_MESSAGE_MISSING_ARGS:
                  "Missing arguments: aMessage, aConsoleNode and aMessageNode are required.",
@@ -1903,17 +1903,16 @@ HeadsUpDisplay.prototype = {
     this.consoleClearButton.setAttribute("buttonType", "clear");
     this.consoleClearButton.setAttribute("hudId", this.hudId);
     var command = "HUDConsoleUI.command(this)";
     this.consoleClearButton.setAttribute("oncommand", command);
 
     this.filterPrefs = HUDService.getDefaultFilterPrefs(this.hudId);
 
     let consoleFilterToolbar = this.makeFilterToolbar();
-    consoleFilterToolbar.setAttribute("mode", "text");
     consoleFilterToolbar.setAttribute("id", "viewGroup");
     this.consoleFilterToolbar = consoleFilterToolbar;
     consoleWrap.appendChild(consoleFilterToolbar);
 
     consoleWrap.appendChild(this.outputNode);
     outerWrap.appendChild(consoleWrap);
 
     this.jsTermParentNode = outerWrap;
@@ -1950,16 +1949,17 @@ HeadsUpDisplay.prototype = {
   makeFilterToolbar: function HUD_makeFilterToolbar()
   {
     let buttons = ["Mutation", "Network", "CSSParser",
                    "Exception", "Error",
                    "Info", "Warn", "Log",];
 
     let toolbar = this.makeXULNode("toolbar");
     toolbar.setAttribute("class", "hud-console-filter-toolbar");
+    toolbar.setAttribute("mode", "text");
 
     toolbar.appendChild(this.consoleClearButton);
     let btn;
     for (var i = 0; i < buttons.length; i++) {
       if (buttons[i] == "Clear") {
         btn = this.makeButton(buttons[i], "plain");
       }
       else {
@@ -1978,17 +1978,17 @@ HeadsUpDisplay.prototype = {
     let prefKey = aName.toLowerCase();
     let btn = this.makeXULNode("toolbarbutton");
 
     if (aType == "checkbox") {
       btn.setAttribute("type", aType);
     }
     btn.setAttribute("hudId", this.hudId);
     btn.setAttribute("buttonType", prefKey);
-    btn.setAttribute("class", "toolbarbutton-text toolbarbutton-1 bookmark-item hud-filter-btn");
+    btn.setAttribute("class", "hud-filter-btn");
     let key = "btn" + aName;
     btn.setAttribute("label", this.getStr(key));
     key = "tip" + aName;
     btn.setAttribute("tooltip", this.getStr(key));
 
     if (aType == "checkbox") {
       btn.setAttribute("checked", this.filterPrefs[prefKey]);
       function toggle(btn) {
--- a/toolkit/components/console/jar.mn
+++ b/toolkit/components/console/jar.mn
@@ -1,6 +1,5 @@
 toolkit.jar:
 *+ content/global/console.js                            (content/console.js)
 *+ content/global/console.xul                           (content/console.xul)
 +  content/global/console.css                           (content/console.css)
 +  content/global/consoleBindings.xml                   (content/consoleBindings.xml)
-*+  content/global/headsUpDisplay.css                    (content/headsUpDisplay.css)
rename from toolkit/components/console/content/headsUpDisplay.css
rename to toolkit/themes/pinstripe/global/headsUpDisplay.css
--- a/toolkit/components/console/content/headsUpDisplay.css
+++ b/toolkit/themes/pinstripe/global/headsUpDisplay.css
@@ -39,18 +39,16 @@
     border-bottom: 1px solid #aaa;
 }
 
 .hud-outer-wrapper {
     width: 100%; 
     height: 100%;
 }
 
-.hud-filter-btn > .toolbarbutton-icon { display: none; }
-
 .hud-console-wrapper {
     width: 100%; 
     overflow: auto; 
 }
 
 .hud-main-label {
     font-size: 1em;
     padding-top: 0.33em;
@@ -144,58 +142,35 @@
     background-color: black;
     color: white;
 }
 
 .jsterm-output-line {
     font-size: 1.2em;
 }
 
-%include ../../../themes/pinstripe/global/shared.inc
+/* these need to be revised ... */
+.hud-filter-btn {
+    font-weight: bold;
+    color: #222;
+    border: 0 !important;
+    -moz-border-radius: 100%;
+}
 
-toolbar[mode="text"] .toolbarbutton-text {
+.hud-filter-btn:hover {
+    background-color: rgba(0, 0, 0, .205) !important;
+    color: #FFF !important;
+    text-shadow: 0 1px rgba(0, 0, 0, .4) !important;
+}
+
+.hud-filter-btn:active:hover {
+    -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.4), 0 1px rgba(255, 255, 255, 0.4);
+    background-color: rgba(0, 0, 0, .5) !important;
+}
+
+.hud-filter-btn > .toolbarbutton-text {
     margin: 1px 2px !important;
 }
 
-toolbarbutton:hover:active,
-toolbarbutton[open="true"] {
-    padding-top: 2px;
-    padding-bottom: 2px;
-    -moz-padding-start: 2px;
-    -moz-padding-end: 1px;
-}
-
-toolbarbutton[disabled="true"],
-toolbarbutton[disabled="true"]:hover,
-toolbarbutton[disabled="true"]:hover:active,
-toolbarbutton[disabled="true"][open="true"] {
-    padding-top: 2px;
-    padding-bottom: 2px;
-    -moz-padding-start: 2px;
-    -moz-padding-end: 1px;
-}
-
-/* ..... checked state ..... */
-
-toolbarbutton[checked="true"] {
-    border-color: ThreeDShadow ThreeDHighlight ThreeDHighlight ThreeDShadow !important;
-    padding-top: 2px !important;
-    padding-bottom: 2px !important;
-    -moz-padding-start: 2px !important;
-    -moz-padding-end: 1px !important;
-}
-
-/* ..... unchecked state ..... */
-
-toolbarbutton[checked="false"] {
-    padding-top: 2px !important;
-    padding-bottom: 2px !important;
-    -moz-padding-start: 2px !important;
-    -moz-padding-end: 1px !important;
-}
-
-toolbar {
+.hud-console-filter-toolbar {
     padding: 1px 0px;
     -moz-box-align: center;
 }
-
-
-
--- a/toolkit/themes/pinstripe/global/jar.mn
+++ b/toolkit/themes/pinstripe/global/jar.mn
@@ -16,16 +16,17 @@ toolkit.jar:
   skin/classic/global/customizeToolbar.css
   skin/classic/global/dialog.css
   skin/classic/global/dropmarker.css
   skin/classic/global/filefield.css
   skin/classic/global/filepicker.css
 * skin/classic/global/findBar.css
 * skin/classic/global/global.css
   skin/classic/global/groupbox.css
+* skin/classic/global/headsUpDisplay.css
   skin/classic/global/linkTree.css
   skin/classic/global/listbox.css
   skin/classic/global/menu.css
   skin/classic/global/menulist.css
   skin/classic/global/notification.css
   skin/classic/global/netError.css
   skin/classic/global/numberbox.css
   skin/classic/global/passwordmgr.css
copy from toolkit/components/console/content/headsUpDisplay.css
copy to toolkit/themes/winstripe/global/headsUpDisplay.css
--- a/toolkit/components/console/content/headsUpDisplay.css
+++ b/toolkit/themes/winstripe/global/headsUpDisplay.css
@@ -39,18 +39,16 @@
     border-bottom: 1px solid #aaa;
 }
 
 .hud-outer-wrapper {
     width: 100%; 
     height: 100%;
 }
 
-.hud-filter-btn > .toolbarbutton-icon { display: none; }
-
 .hud-console-wrapper {
     width: 100%; 
     overflow: auto; 
 }
 
 .hud-main-label {
     font-size: 1em;
     padding-top: 0.33em;
@@ -144,58 +142,16 @@
     background-color: black;
     color: white;
 }
 
 .jsterm-output-line {
     font-size: 1.2em;
 }
 
-%include ../../../themes/pinstripe/global/shared.inc
-
-toolbar[mode="text"] .toolbarbutton-text {
-    margin: 1px 2px !important;
-}
-
-toolbarbutton:hover:active,
-toolbarbutton[open="true"] {
-    padding-top: 2px;
-    padding-bottom: 2px;
-    -moz-padding-start: 2px;
-    -moz-padding-end: 1px;
+.hud-filter-btn {
+    margin: 2px !important;
 }
 
-toolbarbutton[disabled="true"],
-toolbarbutton[disabled="true"]:hover,
-toolbarbutton[disabled="true"]:hover:active,
-toolbarbutton[disabled="true"][open="true"] {
-    padding-top: 2px;
-    padding-bottom: 2px;
-    -moz-padding-start: 2px;
-    -moz-padding-end: 1px;
-}
-
-/* ..... checked state ..... */
-
-toolbarbutton[checked="true"] {
-    border-color: ThreeDShadow ThreeDHighlight ThreeDHighlight ThreeDShadow !important;
-    padding-top: 2px !important;
-    padding-bottom: 2px !important;
-    -moz-padding-start: 2px !important;
-    -moz-padding-end: 1px !important;
-}
-
-/* ..... unchecked state ..... */
-
-toolbarbutton[checked="false"] {
-    padding-top: 2px !important;
-    padding-bottom: 2px !important;
-    -moz-padding-start: 2px !important;
-    -moz-padding-end: 1px !important;
-}
-
-toolbar {
+.hud-console-filter-toolbar {
     padding: 1px 0px;
     -moz-box-align: center;
 }
-
-
-
--- a/toolkit/themes/winstripe/global/jar.mn
+++ b/toolkit/themes/winstripe/global/jar.mn
@@ -20,16 +20,17 @@ toolkit.jar:
         skin/classic/global/dropmarker.css
         skin/classic/global/expander.css
         skin/classic/global/filefield.css
         skin/classic/global/filepicker.css
         skin/classic/global/findBar.css
 *       skin/classic/global/global.css
         skin/classic/global/globalBindings.xml
         skin/classic/global/groupbox.css
+*       skin/classic/global/headsUpDisplay.css
         skin/classic/global/linkTree.css
         skin/classic/global/listbox.css
 *       skin/classic/global/menu.css
         skin/classic/global/menulist.css
         skin/classic/global/netError.css
         skin/classic/global/numberbox.css
         skin/classic/global/notification.css
         skin/classic/global/passwordmgr.css
@@ -185,16 +186,17 @@ toolkit.jar:
         skin/classic/aero/global/dropmarker.css
         skin/classic/aero/global/expander.css
         skin/classic/aero/global/filefield.css
         skin/classic/aero/global/filepicker.css
         skin/classic/aero/global/findBar.css
 *       skin/classic/aero/global/global.css
         skin/classic/aero/global/globalBindings.xml
         skin/classic/aero/global/groupbox.css
+*       skin/classic/aero/global/headsUpDisplay.css
         skin/classic/aero/global/linkTree.css
         skin/classic/aero/global/listbox.css
 *       skin/classic/aero/global/menu.css                                (menu-aero.css)
 *       skin/classic/aero/global/menulist.css                            (menulist-aero.css)
         skin/classic/aero/global/netError.css
         skin/classic/aero/global/numberbox.css
         skin/classic/aero/global/notification.css
         skin/classic/aero/global/passwordmgr.css