mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 886573 - make zoom controls display the right thing in Australis even in customize mode, r=jaws
This commit is contained in:
parent
8b93b8495e
commit
749004af53
@ -416,6 +416,11 @@ const CustomizableWidgets = [{
|
||||
let zoomResetButton = node.childNodes[2];
|
||||
let window = aDocument.defaultView;
|
||||
function updateZoomResetButton() {
|
||||
let updateDisplay = true;
|
||||
// Label should always show 100% in customize mode, so don't update:
|
||||
if (aDocument.documentElement.hasAttribute("customizing")) {
|
||||
updateDisplay = false;
|
||||
}
|
||||
//XXXgijs in some tests we get called very early, and there's no docShell on the
|
||||
// tabbrowser. This breaks the zoom toolkit code (see bug 897410). Don't let that happen:
|
||||
let zoomFactor = 100;
|
||||
@ -423,7 +428,7 @@ const CustomizableWidgets = [{
|
||||
zoomFactor = Math.floor(window.ZoomManager.zoom * 100);
|
||||
} catch (e) {}
|
||||
zoomResetButton.setAttribute("label", CustomizableUI.getLocalizedProperty(
|
||||
buttons[1], "label", [zoomFactor]
|
||||
buttons[1], "label", [updateDisplay ? zoomFactor : 100]
|
||||
));
|
||||
};
|
||||
|
||||
@ -508,6 +513,18 @@ const CustomizableWidgets = [{
|
||||
container.removeEventListener("TabSelect", updateZoomResetButton);
|
||||
}.bind(this),
|
||||
|
||||
onCustomizeStart: function(aWindow) {
|
||||
if (aWindow.document == aDocument) {
|
||||
updateZoomResetButton();
|
||||
}
|
||||
},
|
||||
|
||||
onCustomizeEnd: function(aWindow) {
|
||||
if (aWindow.document == aDocument) {
|
||||
updateZoomResetButton();
|
||||
}
|
||||
},
|
||||
|
||||
onWidgetDrag: function(aWidgetId, aArea) {
|
||||
if (aWidgetId != this.id)
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user