mirror of
https://github.com/hoornet/vega.git
synced 2026-04-29 09:10:00 -07:00
Move zoom from document root to main content area only
Sidebar now stays at fixed size regardless of font setting. Only the content area (feed, settings, thread, articles, etc.) scales with the font size preference. This prevents the sidebar from bloating and eating into content space at larger zoom levels.
This commit is contained in:
@@ -66,9 +66,12 @@ function App() {
|
||||
|
||||
useKeyboardShortcuts();
|
||||
|
||||
// Apply zoom level based on font size setting
|
||||
// Apply zoom to main content area only (sidebar stays fixed size)
|
||||
useEffect(() => {
|
||||
document.documentElement.style.zoom = `${fontSize / 14}`;
|
||||
// Clear any old root zoom
|
||||
document.documentElement.style.zoom = "";
|
||||
// Set CSS custom property for components that need to know the scale
|
||||
document.documentElement.style.setProperty("--ui-zoom", `${fontSize / 14}`);
|
||||
}, [fontSize]);
|
||||
|
||||
// Apply color theme
|
||||
@@ -104,7 +107,7 @@ function App() {
|
||||
<UpdateBanner />
|
||||
<div className="flex flex-1 min-h-0">
|
||||
<Sidebar />
|
||||
<main className="flex-1 min-w-0">
|
||||
<main className="flex-1 min-w-0 h-full overflow-hidden" style={{ zoom: `${fontSize / 14}` }}>
|
||||
<div className={currentView === "feed" ? "contents" : "hidden"}>
|
||||
<Feed />
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user