mirror of
https://github.com/Stirling-Tools/Stirling-PDF.git
synced 2025-08-27 06:39:24 +00:00
More scaling fixes
This commit is contained in:
parent
08e1fd7ca0
commit
25447721e3
@ -479,8 +479,9 @@ html[dir="rtl"] .dropdown-menu[data-bs-popper] {
|
|||||||
display: flex;
|
display: flex;
|
||||||
gap: 30px;
|
gap: 30px;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
width: 100%;
|
width: 140%;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
left: -20%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.feature-group {
|
.feature-group {
|
||||||
|
@ -32,9 +32,8 @@
|
|||||||
|
|
||||||
// Counter-scale to maintain same visual size
|
// Counter-scale to maintain same visual size
|
||||||
const navScale = 1.1 / currentDPR;
|
const navScale = 1.1 / currentDPR;
|
||||||
// Dropdowns are children of navbar, so they inherit the navbar scaling
|
// Scale dropdowns relative to navbar scaling to keep them proportional
|
||||||
// We need to counter both the browser scaling AND the navbar scaling
|
const dropdownScale = Math.min(1.1, 1.1 / Math.sqrt(currentDPR));
|
||||||
const dropdownScale = 1.1;
|
|
||||||
|
|
||||||
console.log('DPR:', currentDPR, 'navScale:', navScale, 'will apply scaling');
|
console.log('DPR:', currentDPR, 'navScale:', navScale, 'will apply scaling');
|
||||||
|
|
||||||
@ -46,6 +45,12 @@
|
|||||||
navbar.style.width = `${100 / navScale}%`;
|
navbar.style.width = `${100 / navScale}%`;
|
||||||
navbar.style.left = '50%';
|
navbar.style.left = '50%';
|
||||||
|
|
||||||
|
// Adjust bottom margin based on scale to prevent overlap/gaps
|
||||||
|
const baseHeight = 60; // Assume base navbar height
|
||||||
|
const scaledHeight = baseHeight * navScale;
|
||||||
|
const marginAdjustment = scaledHeight - baseHeight;
|
||||||
|
navbar.style.marginBottom = `${marginAdjustment}px`;
|
||||||
|
|
||||||
|
|
||||||
console.log('Applied navbar scale:', navScale);
|
console.log('Applied navbar scale:', navScale);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user