Look like SaraFem and SaraSuite: no custom title bar

The window keeps its own title bar (or none, per HideWindowTitleBar), with
SaraSuite's header (name, Add to app menu for AppImages, gear). Settings
is now a dialog laid out like SaraFem's, with export/import on the
SaraSuite tab, and notifications use SaraFem's tinted toast style.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
sarahandClaude Opus 5.5 committed 2026-10-07 22:36:04 +02:00
1 parent f7ed23edf9
commit e90f59bc16
6 files changed
+338 -219

No files matched your search

+17
View File
@@ -277,6 +277,23 @@ def BuildTheme() -> ft.Theme:
)
def BlendHex(BaseHex: str, AccentHex: str, Ratio: float) -> str:
"""Solid colour mixing Base and Accent (0 = pure Base, 1 = pure Accent),
for tinted-but-still-dark backgrounds. Same as SaraFem's."""
BaseRGB = tuple(int(BaseHex.lstrip("#")[i : i + 2], 16) for i in (0, 2, 4))
AccentRGB = tuple(int(AccentHex.lstrip("#")[i : i + 2], 16) for i in (0, 2, 4))
Mixed = (round(B + (A - B) * Ratio) for B, A in zip(BaseRGB, AccentRGB))
return "#" + "".join(f"{C:02x}" for C in Mixed)
def NotificationStyle(Kind: str) -> tuple[str, str]:
"""(Background, AccentColor) for a toast, from the theme's own colours like
SaraFem's: "success" green, "error" red, plus "warning" yellow and "info"
mauve for SaraSort's restart-needed and plain notes."""
Accent = {"success": Palette.Green, "error": Palette.Red, "warning": Palette.Yellow}.get(Kind, Palette.Mauve)
return BlendHex(Palette.Mantle, Accent, 0.12), Accent
def ChipButtonStyle(Accent: str = "") -> ft.ButtonStyle:
"""SaraView's button look: SurfaceAlt fill, 1px accent border, small radius."""
return ft.ButtonStyle(