@@ -34,6 +34,7 @@ import { useEditor } from "@/context/EditorContext";
3434import { useExtensions } from "@/context/ExtensionsContext" ;
3535import { useCommands } from "@/context/CommandContext" ;
3636import { useLayout } from "@/context/LayoutContext" ;
37+ import { useSettings } from "@/context/SettingsContext" ;
3738import { useNotifications } from "@/context/NotificationsContext" ;
3839import { useOutput } from "@/context/OutputContext" ;
3940import { useWindowEvents } from "@/hooks/useWindowEvents" ;
@@ -274,6 +275,7 @@ function AppContent(props: ParentProps) {
274275 const layout = useLayout ( ) ;
275276 const notifications = useNotifications ( ) ;
276277 const output = useOutput ( ) ;
278+ const settingsCtx = useSettings ( ) ;
277279
278280 // Window lifecycle events (close-requested with dirty file prompt, focus/blur,
279281 // beforeunload, visibilitychange, force-close cleanup)
@@ -282,6 +284,14 @@ function AppContent(props: ParentProps) {
282284 // Auto-save dirty files based on user settings (afterDelay, onFocusChange, onWindowChange)
283285 useAutoSave ( ) ;
284286
287+ createEffect ( ( ) => {
288+ const theme = settingsCtx . settings ( ) . theme ;
289+ const root = document . documentElement . style ;
290+ root . setProperty ( "font-family" , theme . uiFontFamily ) ;
291+ root . setProperty ( "font-size" , `${ theme . uiFontSize } px` ) ;
292+ root . setProperty ( "zoom" , String ( theme . zoomLevel ) ) ;
293+ } ) ;
294+
285295 // Global error handler (unhandled rejections, uncaught errors)
286296 let cleanupErrorHandler : ( ( ) => void ) | undefined ;
287297
@@ -450,6 +460,9 @@ function AppContent(props: ParentProps) {
450460 window . removeEventListener ( "dev:inspector" , handleDevInspector ) ;
451461 if ( mcpCleanup ) mcpCleanup ( ) ;
452462 if ( cleanupErrorHandler ) cleanupErrorHandler ( ) ;
463+ document . documentElement . style . removeProperty ( "font-family" ) ;
464+ document . documentElement . style . removeProperty ( "font-size" ) ;
465+ document . documentElement . style . removeProperty ( "zoom" ) ;
453466 invoke ( "unregister_window" , { label : getWindowLabel ( ) } ) . catch ( ( ) => { } ) ;
454467 } ) ;
455468
0 commit comments