Bug 520637 - Draw lightweight themes in the titlebar. r=dao, r=enndeakin
--- a/toolkit/content/LightweightThemeConsumer.jsm
+++ b/toolkit/content/LightweightThemeConsumer.jsm
@@ -92,23 +92,20 @@ LightweightThemeConsumer.prototype = {
_setImage(footer, active, aData.footerURL);
if (active && aData.footerURL)
footer.setAttribute("lwthemefooter", "true");
else
footer.removeAttribute("lwthemefooter");
}
#ifdef XP_MACOSX
- if (active && aData.accentcolor) {
- root.setAttribute("activetitlebarcolor", aData.accentcolor);
- root.setAttribute("inactivetitlebarcolor", aData.accentcolor);
- } else {
- root.removeAttribute("activetitlebarcolor");
- root.removeAttribute("inactivetitlebarcolor");
- }
+ if (active)
+ root.setAttribute("drawintitlebar", "true");
+ else
+ root.removeAttribute("drawintitlebar");
#endif
}
}
function _setImage(aElement, aActive, aURL) {
aElement.style.backgroundImage =
(aActive && aURL) ? 'url("' + aURL.replace('"', '\\"', "g") + '")' : "";
}
--- a/toolkit/content/xul.css
+++ b/toolkit/content/xul.css
@@ -17,16 +17,22 @@
-moz-box-sizing: border-box;
}
:root {
text-rendering: optimizeLegibility;
-moz-binding: url("chrome://global/content/bindings/general.xml#root-element");
}
+%ifdef XP_MACOSX
+:root[drawintitlebar="true"] {
+ padding-top: 22px;
+}
+%endif
+
:root:-moz-locale-dir(rtl) {
direction: rtl;
}
/* hide the content and destroy the frame */
[hidden="true"] {
display: none;
}