Skip to content

Commit

Permalink
Merge pull request #100 from sanoojes/fix-global-nav
Browse files Browse the repository at this point in the history
fix: transparent window controls in global nav
  • Loading branch information
Astromations authored May 31, 2024
2 parents ffd48ca + afde38f commit 8a8e4ff
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion hazy.js
Original file line number Diff line number Diff line change
Expand Up @@ -162,10 +162,11 @@
const zoomLevel = value.entries['app.browser.zoom-level'].number;
const zoomNum = Number(zoomLevel)
const multiplier = zoomNum != 0 ? zoomNum/50 : 0;
const isGlobalNav = document.querySelector(".Root__globalNav");
constant = 0.912872807

final_width = 135 * (constant**(multiplier));
final_height = 40 * (constant**(multiplier));
final_height = (isGlobalNav ? 64 : 40) * (constant**(multiplier));
document.documentElement.style.setProperty("--control-width", Math.abs(final_width) + "px");
document.documentElement.style.setProperty("--control-height", Math.abs(final_height) + "px");
console.log("zoom adjusted")
Expand Down

0 comments on commit 8a8e4ff

Please sign in to comment.