Skip to content

Commit

Permalink
fix: transparent window controls in global nav
Browse files Browse the repository at this point in the history
  • Loading branch information
sanoojes committed May 30, 2024
1 parent fb731a3 commit afde38f
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 afde38f

Please sign in to comment.