mirror of
https://github.com/Stirling-Tools/Stirling-PDF.git
synced 2025-08-27 06:39:24 +00:00
additional scaling changes
This commit is contained in:
parent
037e4da5c6
commit
a3962a74c3
@ -479,9 +479,8 @@ html[dir="rtl"] .dropdown-menu[data-bs-popper] {
|
|||||||
display: flex;
|
display: flex;
|
||||||
gap: 30px;
|
gap: 30px;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
width: 140%;
|
width: 100%;
|
||||||
position: relative;
|
position: relative;
|
||||||
left: -20%;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.feature-group {
|
.feature-group {
|
||||||
|
@ -24,12 +24,17 @@
|
|||||||
<script>
|
<script>
|
||||||
window.stirlingPDF = window.stirlingPDF || {};
|
window.stirlingPDF = window.stirlingPDF || {};
|
||||||
|
|
||||||
|
const systemDPR = Math.round(window.devicePixelRatio) || 1;
|
||||||
|
|
||||||
function scaleNav() {
|
function scaleNav() {
|
||||||
const currentDPR = window.devicePixelRatio || 1;
|
const currentDPR = window.devicePixelRatio || 1;
|
||||||
|
const browserZoom = currentDPR / systemDPR;
|
||||||
|
|
||||||
// Always counter the scaling
|
// Counter-scale to maintain same visual size
|
||||||
const navScale = 1 / currentDPR;
|
const navScale = 1.1 / currentDPR;
|
||||||
const dropdownScale = 1 / Math.sqrt(currentDPR);
|
// Dropdowns are children of navbar, so they inherit the navbar scaling
|
||||||
|
// We need to counter both the browser scaling AND the navbar scaling
|
||||||
|
const dropdownScale = 1.1;
|
||||||
|
|
||||||
console.log('DPR:', currentDPR, 'navScale:', navScale, 'will apply scaling');
|
console.log('DPR:', currentDPR, 'navScale:', navScale, 'will apply scaling');
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user