mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 944947 - automatically hyphenate labels for items in Australis' menupanel, r=MattN
--HG-- extra : rebase_source : 3c621f7203eaec41d545c6da884f2b6856af94a7
This commit is contained in:
parent
0bd98e93a5
commit
38de1add5a
@ -207,6 +207,8 @@ const PanelUI = {
|
||||
return this._readyPromise;
|
||||
}
|
||||
this._readyPromise = Task.spawn(function() {
|
||||
this.contents.setAttributeNS("http://www.w3.org/XML/1998/namespace", "lang",
|
||||
getLocale());
|
||||
if (!this._scrollWidth) {
|
||||
// In order to properly center the contents of the panel, while ensuring
|
||||
// that we have enough space on either side to show a scrollbar, we have to
|
||||
@ -418,3 +420,25 @@ const PanelUI = {
|
||||
this.removeEventListener("command", PanelUI.onCommandHandler);
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Gets the currently selected locale for display.
|
||||
* @return the selected locale or "en-US" if none is selected
|
||||
*/
|
||||
function getLocale() {
|
||||
try {
|
||||
let locale = Services.prefs.getComplexValue(PREF_SELECTED_LOCALE,
|
||||
Ci.nsIPrefLocalizedString);
|
||||
if (locale)
|
||||
return locale;
|
||||
}
|
||||
catch (e) { }
|
||||
|
||||
try {
|
||||
return Services.prefs.getCharPref(PREF_SELECTED_LOCALE);
|
||||
}
|
||||
catch (e) { }
|
||||
|
||||
return "en-US";
|
||||
}
|
||||
|
||||
|
@ -79,6 +79,7 @@ toolbaritem[cui-areatype="menu-panel"][sdkstylewidget="true"]:not(.panel-wide-it
|
||||
font-size: @panelTextSize@;
|
||||
margin: 2px 0 0;
|
||||
text-align: center;
|
||||
-moz-hyphens: auto;
|
||||
}
|
||||
|
||||
#wrapper-edit-controls:-moz-any([place="palette"],[place="panel"]) > #edit-controls,
|
||||
|
Loading…
Reference in New Issue
Block a user