From 7cc8587fa843969dcbae9bcbfdf1f5262f0f5635 Mon Sep 17 00:00:00 2001 From: "courtmanr@gmail.com" Date: Mon, 28 Apr 2025 09:35:22 +0100 Subject: [PATCH] Remove UI scale slider --- src/public/app.js | 41 ----------------------------------------- src/public/index.html | 4 ++-- 2 files changed, 2 insertions(+), 43 deletions(-) diff --git a/src/public/app.js b/src/public/app.js index 3acb43f9d..a4ebb719b 100644 --- a/src/public/app.js +++ b/src/public/app.js @@ -2557,45 +2557,4 @@ document.addEventListener('DOMContentLoaded', function() { } // ---> END NEW Function <--- - // --- START: UI Scale Slider Logic --- - const uiScaleSlider = document.getElementById('ui-scale-slider'); - // Target the root element for font-size adjustment - // REUSE existing variable declared earlier - - const applyRootFontSize = (sliderValue) => { - // Map slider value (0.75-1.25) to root font size (e.g., 12px-20px, centered around 16px) - const baseSize = 16; // Assuming default browser root font size is 16px - const newSizePx = baseSize * sliderValue; - - if (htmlElement) { - htmlElement.style.fontSize = `${newSizePx}px`; - } - if (uiScaleSlider) { - uiScaleSlider.value = sliderValue; - } - }; - - const loadRootFontSize = () => { - const savedMultiplier = localStorage.getItem('uiFontMultiplier'); - if (savedMultiplier) { - applyRootFontSize(parseFloat(savedMultiplier)); - } else { - applyRootFontSize(1.0); // Default multiplier (maps to 16px) - } - }; - - if (uiScaleSlider && htmlElement) { - uiScaleSlider.addEventListener('input', (event) => { - const newMultiplier = parseFloat(event.target.value); - applyRootFontSize(newMultiplier); - localStorage.setItem('uiFontMultiplier', newMultiplier.toString()); - }); - - // Load initial font size - loadRootFontSize(); - } else { - console.error('Could not find UI scale slider or HTML element.'); - } - // --- END: UI Scale Slider Logic --- - }); // End DOMContentLoaded diff --git a/src/public/index.html b/src/public/index.html index 4298384bf..521bf28b8 100644 --- a/src/public/index.html +++ b/src/public/index.html @@ -50,9 +50,9 @@
-
+