diff --git a/src/zen/boosts/ZenBoostsEditor.mjs b/src/zen/boosts/ZenBoostsEditor.mjs index 7254ac3fd..2b224690c 100644 --- a/src/zen/boosts/ZenBoostsEditor.mjs +++ b/src/zen/boosts/ZenBoostsEditor.mjs @@ -638,7 +638,7 @@ ${cssSelector} { /** * Handles the size toggle button press, cycling through size override options */ - onBoostSizePressed() { + async onBoostSizePressed() { if (this.currentBoostData.sizeOverride == 1) { this.currentBoostData.sizeOverride = 1.1; } else if (this.currentBoostData.sizeOverride == 1.1) { @@ -649,6 +649,12 @@ ${cssSelector} { this.currentBoostData.sizeOverride = 0.9; } else if (this.currentBoostData.sizeOverride == 0.9) { this.currentBoostData.sizeOverride = 1; + + const linkedBrowser = + this.openerWindow.gBrowser.selectedTab.linkedBrowser; + const actor = + linkedBrowser.browsingContext.currentWindowGlobal.getActor("ZenBoosts"); + await actor.sendQuery("ZenBoost:DisableSizeOverride"); } this.updateSizeButtonVisuals(); diff --git a/src/zen/boosts/actors/ZenBoostsChild.sys.mjs b/src/zen/boosts/actors/ZenBoostsChild.sys.mjs index 597a74c09..13551682f 100644 --- a/src/zen/boosts/actors/ZenBoostsChild.sys.mjs +++ b/src/zen/boosts/actors/ZenBoostsChild.sys.mjs @@ -280,6 +280,9 @@ export class ZenBoostsChild extends JSWindowActorChild { case "ZenBoost:OpenInspector": this.sendAsyncMessage("ZenBoost:OpenInspector"); break; + case "ZenBoost:DisableSizeOverride": + this.disableSizeOverride(); + break; } return null; } @@ -549,6 +552,14 @@ export class ZenBoostsChild extends JSWindowActorChild { this.sendNotify("selector-picker-state-update", "ondisable"); } + disableSizeOverride() { + const browsingContext = this.browsingContext; + if (!browsingContext || browsingContext.parent !== null) { + return; + } + browsingContext.fullZoom = 1; + } + sendNotify(topic, msg = null) { this.sendAsyncMessage("ZenBoost:Notify", { topic, msg }); }