fix dpi 2

This commit is contained in:
Reece 2025-07-03 18:11:01 +01:00
parent d2ace29921
commit be3f82a2e4

View File

@ -32,10 +32,10 @@
// Counter-scale to maintain same visual size // Counter-scale to maintain same visual size
const isMobile = window.innerWidth <= 768 || /Android|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent); const isMobile = window.innerWidth <= 768 || /Android|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);
const baseScale = isMobile ? 3 : 1.1; // 180% bigger on mobile (1 + 1.8 = 2.8, but 1.98 accounts for counter-scaling) const isHighDPI = currentDPR > 2.0;
let navScale = baseScale / currentDPR; let baseScale = isMobile ? 3 : 1.1;
// Prevent navbar from becoming too tiny on very high DPI screens if (isHighDPI) baseScale *= 2; // Double base size on high DPI screens
navScale = Math.max(0.7, navScale); const navScale = baseScale / currentDPR;
// Dropdowns at 100% (no additional scaling) // Dropdowns at 100% (no additional scaling)
const dropdownScale = 1.0; const dropdownScale = 1.0;