Bug 941058 - [Australis] titlebar buttons are swapped in RTL mode, r=mikedeboer

This commit is contained in:
Gijs Kruitbosch 2013-11-20 19:27:04 +01:00
parent 6ab865d2c5
commit a6ab33fe81
3 changed files with 32 additions and 16 deletions

View File

@ -185,6 +185,36 @@ toolbar[customizing] > .overflow-button {
#titlebar-fullscreen-button {
-moz-appearance: -moz-mac-fullscreen-button;
}
/* Because these buttons don't move, they should always be aligned the same,
* left and right were deprecated, so we have to do work to get it to mean that: */
#titlebar-buttonbox-container:-moz-locale-dir(ltr) {
-moz-box-align: start;
}
#titlebar-buttonbox-container:-moz-locale-dir(rtl) {
-moz-box-align: end;
}
/* Fullscreen and caption buttons don't move with RTL on OS X so override the automatic ordering. */
#titlebar-fullscreen-button:-moz-locale-dir(ltr),
#titlebar-buttonbox-container:-moz-locale-dir(rtl),
.titlebar-placeholder[type="fullscreen-button"]:-moz-locale-dir(ltr),
.titlebar-placeholder[type="caption-buttons"]:-moz-locale-dir(rtl) {
-moz-box-ordinal-group: 1000;
}
#titlebar-fullscreen-button:-moz-locale-dir(rtl),
#titlebar-buttonbox-container:-moz-locale-dir(ltr),
.titlebar-placeholder[type="caption-buttons"]:-moz-locale-dir(ltr),
.titlebar-placeholder[type="fullscreen-button"]:-moz-locale-dir(rtl) {
-moz-box-ordinal-group: 0;
}
%else
/* On non-OSX, these should be start-aligned */
#titlebar-buttonbox-container {
-moz-box-align: start;
}
%endif
%ifdef XP_WIN

View File

@ -423,11 +423,7 @@
<vbox id="titlebar">
<hbox id="titlebar-content">
<spacer id="titlebar-spacer" flex="1"/>
<hbox id="titlebar-buttonbox-container" align="start"
#ifdef XP_MACOSX
ordinal="0"
#endif
>
<hbox id="titlebar-buttonbox-container">
<hbox id="titlebar-buttonbox">
<toolbarbutton class="titlebar-button" id="titlebar-min" oncommand="window.minimize();"/>
<toolbarbutton class="titlebar-button" id="titlebar-max" oncommand="onTitlebarMaxClick();"/>
@ -435,7 +431,7 @@
</hbox>
</hbox>
#ifdef XP_MACOSX
<hbox id="titlebar-fullscreen-button" ordinal="1000"/>
<hbox id="titlebar-fullscreen-button"/>
#endif
</hbox>
</vbox>

View File

@ -59,16 +59,6 @@
}
}
/* Fullscreen and caption buttons don't move with RTL on OS X so override the automatic ordering. */
.titlebar-placeholder[type="fullscreen-button"]:-moz-locale-dir(ltr),
.titlebar-placeholder[type="caption-buttons"]:-moz-locale-dir(rtl) {
-moz-box-ordinal-group: 1000;
}
.titlebar-placeholder[type="caption-buttons"]:-moz-locale-dir(ltr),
.titlebar-placeholder[type="fullscreen-button"]:-moz-locale-dir(rtl) {
-moz-box-ordinal-group: 0;
}
#main-window[chromehidden~="toolbar"] > #titlebar {
padding-top: 22px;
}