From d2ace299214011c65d3e9973f61bb86aaa9920e4 Mon Sep 17 00:00:00 2001 From: Reece Date: Thu, 3 Jul 2025 17:52:24 +0100 Subject: [PATCH] Scaling on high dps monitors --- .../src/main/resources/templates/fragments/common.html | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/stirling-pdf/src/main/resources/templates/fragments/common.html b/stirling-pdf/src/main/resources/templates/fragments/common.html index 215927162..6cd0e1c88 100644 --- a/stirling-pdf/src/main/resources/templates/fragments/common.html +++ b/stirling-pdf/src/main/resources/templates/fragments/common.html @@ -33,7 +33,9 @@ // 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 baseScale = isMobile ? 3 : 1.1; // 180% bigger on mobile (1 + 1.8 = 2.8, but 1.98 accounts for counter-scaling) - const navScale = baseScale / currentDPR; + let navScale = baseScale / currentDPR; + // Prevent navbar from becoming too tiny on very high DPI screens + navScale = Math.max(0.7, navScale); // Dropdowns at 100% (no additional scaling) const dropdownScale = 1.0;