Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 14 additions & 4 deletions src/zen/boosts/ZenBoostsEditor.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -639,7 +639,7 @@ ${cssSelector} {
* Handles the size toggle button press, cycling through size override options
*/
onBoostSizePressed() {
if (this.currentBoostData.sizeOverride == 1) {
if (this.currentBoostData.sizeOverride == 0) {
this.currentBoostData.sizeOverride = 1.1;
} else if (this.currentBoostData.sizeOverride == 1.1) {
this.currentBoostData.sizeOverride = 1.25;
Expand All @@ -649,6 +649,8 @@ ${cssSelector} {
this.currentBoostData.sizeOverride = 0.9;
} else if (this.currentBoostData.sizeOverride == 0.9) {
this.currentBoostData.sizeOverride = 1;
} else if (this.currentBoostData.sizeOverride == 1) {
this.currentBoostData.sizeOverride = 0;
}

this.updateSizeButtonVisuals();
Expand Down Expand Up @@ -1120,7 +1122,7 @@ ${cssSelector} {
const sizeValue = this.doc.getElementById("zen-boost-size-value");

switch (this.currentBoostData.sizeOverride) {
case 1:
case 0:
sizeButton.setAttribute("mode", "none");
sizeText.style.display = "initial";
sizeValue.style.display = "none";
Expand All @@ -1145,6 +1147,11 @@ ${cssSelector} {
sizeText.style.display = "none";
sizeValue.style.display = "initial";
break;
case 1:
sizeButton.setAttribute("mode", "green");
sizeText.style.display = "none";
sizeValue.style.display = "initial";
break;
}
sizeValue.setHTML(
`${Math.round(this.currentBoostData.sizeOverride * 100)}%`
Expand Down Expand Up @@ -1581,8 +1588,11 @@ ${cssSelector} {
const gradient = this.doc.querySelector(".zen-boost-color-picker-gradient");
const rect = gradient.getBoundingClientRect();

if (!this.currentBoostData.sizeOverride) {
this.currentBoostData.sizeOverride = 1;
if (
!this.currentBoostData.sizeOverride &&
this.currentBoostData.sizeOverride !== 0
) {
this.currentBoostData.sizeOverride = 0;
}

if (
Expand Down
2 changes: 1 addition & 1 deletion src/zen/boosts/ZenBoostsManager.sys.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ class nsZenBoostsManager {
autoTheme: false,

textCaseOverride: "none",
sizeOverride: 1,
sizeOverride: 0,

zapSelectors: [],
customCSS: "",
Expand Down
2 changes: 1 addition & 1 deletion src/zen/boosts/actors/ZenBoostsChild.sys.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ export class ZenBoostsChild extends JSWindowActorChild {
if (
boostData.sizeOverride &&
isFinite(boostData.sizeOverride) &&
boostData.sizeOverride !== 1
boostData.sizeOverride !== 0
) {
browsingContext.fullZoom = boostData.sizeOverride;
}
Expand Down
5 changes: 5 additions & 0 deletions src/zen/boosts/zen-boosts.css
Original file line number Diff line number Diff line change
Expand Up @@ -627,6 +627,11 @@ body {
--mod-button-c1: light-dark(#6650fc, #5d56ca);
--mod-button-c2: light-dark(#4125ff, #453aa9);
}
.mod-button[mode="green"] {
color: #e3e9e4;
--mod-button-c1: light-dark(#2dd75d, #187432);
--mod-button-c2: light-dark(#23a849, #0c3919);
}
.mod-button[mode] {
background: linear-gradient(180deg, var(--mod-button-c1) 0%, var(--mod-button-c2) 100%) border-box;
transition:
Expand Down