看來非 Aero Glass 的情況要複雜一點。現在你需要把之前的 userChrome.css 刪掉再來一遍。
引言回覆:
.titlebar-placeholder{display:-moz-box !important}
.titlebar-placeholder[type="appmenu-button"] {width: Xpx}
.titlebar-placeholder[type="caption-buttons"] {width: Ypx}
window:not([sizemode="maximized"]) #titlebar{margin-bottom: -Apx !important; height: Bpx}
@media not all and (-moz-windows-compositor) {
#main-window:not([inFullscreen]) #toolbar-menubar[inactive] ~ #TabsToolbar:not(:-moz-lwtheme) {
background: none !important;
color: CaptionText;
}
#main-window:not([inFullscreen]) #toolbar-menubar[inactive] ~ #TabsToolbar:not(:-moz-lwtheme):-moz-window-inactive {
color: InactiveCaptionText;
}
#appmenu-button-container,
#titlebar-buttonbox {
position: relative;
}
}
代碼:
var doc = Components.classes["@mozilla.org/appshell/window-mediator;1"]
.getService(Components.interfaces.nsIWindowMediator)
.getMostRecentWindow("navigator:browser").document;
var titlebar = doc.getElementById("titlebar");
alert("X = "+doc.getElementsByAttribute("type","appmenu-button")[0].width
+"\nY = "+doc.getElementsByAttribute("type","caption-buttons")[0].width
+"\nA = "+/\d+(?=px)/.exec(titlebar.getAttribute("style"))
+"\nB = "+titlebar.clientHeight);
B 這個值是標題列的高度。小於這個值的話,標題列的高度是不會再減小的,而標題列剛好沒有空白給你移動視窗。意思就是,0~B 的效果都是一樣的,大於 B 之後標題列就會變高一些,讓你移動視窗的空白地方就更多。