mirror of
https://git.srhtnin.garden/sarah/SaraFem.git
synced 2026-10-15 02:23:17 +02:00
Shared SaraSuite settings (theme, font, title bar) with a SaraSuite settings tab
This commit is contained in:
1 parent
089dfc005f
commit
a5f5c5ca79
3 files changed
+159
-19
No files matched your search
@@ -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:
|
||||
|
||||
Reference in new issue
Block a user