525
edits
No edit summary |
No edit summary |
||
Line 32: | Line 32: | ||
Resizable windows should have resizer markers in their bottom right corners. App developers should not need to do this themselves. The marker should not steal space from the content within the window. | Resizable windows should have resizer markers in their bottom right corners. App developers should not need to do this themselves. The marker should not steal space from the content within the window. | ||
=== Preferences Windows === | |||
Preferences windows have no close button on MacOS X so getting the features right is more important. The canonical way, per utilityOverlay.js is: | |||
<code> | |||
function showPreferences(paneID) { | |||
var instantApply = getBoolPref("browser.preferences.instantApply", false); | |||
var features = "chrome,titlebar,toolbar,centerscreen" + (instantApply ? ",dialog=no" : ",modal"); | |||
var wm = Components.classes["@mozilla.org/appshell/window-mediator;1"] | |||
.getService(Components.interfaces.nsIWindowMediator); | |||
var win = wm.getMostRecentWindow("Browser:Preferences"); | |||
if (win) { | |||
win.focus(); | |||
if (paneID) { | |||
var pane = win.document.getElementById(paneID); | |||
win.document.documentElement.showPane(pane); | |||
} | |||
} | |||
else | |||
openDialog("chrome://browser/content/preferences/preferences.xul", | |||
"Preferences", features, paneID); | |||
} | |||
</code> | |||
This needs to be rolled up somehow into a clean API. |
edits