Shared SaraSuite settings (theme, font, title bar) with a SaraSuite settings tab

This commit is contained in:
sarah committed 2026-09-24 23:40:21 +02:00
1 parent 089dfc005f
commit a5f5c5ca79
3 files changed
+159 -19

No files matched your search

+5 -4
View File
@@ -11,7 +11,7 @@ from typing import Optional
import flet as ft
from Browser import Browser
from Core import AppName, ApplyTheme, BuildTheme, FontFamily, LoadConfig
from Core import AppName, ApplyAppearance, BuildTheme, BundledFontFamily, EffectiveSettings, LoadConfig
from Sidebar import Sidebar
@@ -189,16 +189,17 @@ def _RunPickerMode(Page: ft.Page, Config, Args: argparse.Namespace) -> None:
def Main(Page: ft.Page) -> None:
Config = LoadConfig()
ApplyTheme(Config.Theme) # must run before anything reads Palette.X
Appearance = EffectiveSettings(Config) # shared SaraSuite settings, or SaraFem's own
ApplyAppearance(Appearance) # must run before anything reads Palette.X
Page.theme_mode = ft.ThemeMode.DARK
Page.theme = BuildTheme()
Page.dark_theme = BuildTheme()
Page.fonts = {FontFamily: "fonts/Fixedsys_Excelsior_Regular.ttf"}
Page.fonts = {BundledFontFamily: "fonts/Fixedsys_Excelsior_Regular.ttf"}
Page.padding = 0
Page.window.width = 1100
Page.window.height = 700
Page.window.title_bar_hidden = Config.HideWindowTitleBar
Page.window.title_bar_hidden = Appearance.HideWindowTitleBar
PickerArgs = _ParsePickerArgs()
if PickerArgs.pick_open or PickerArgs.pick_save or PickerArgs.pick_folder: