mirror of
https://git.srhtnin.garden/sarah/SaraSort.git
synced 2026-10-14 10:48:11 +02:00
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:
1 parent
f7ed23edf9
commit
e90f59bc16
6 files changed
+338
-219
No files matched your search
+6
-3
@@ -7,7 +7,7 @@ from typing import Callable, Optional
|
||||
|
||||
import flet as ft
|
||||
|
||||
from Core import AppConfig, ChildEnvironment, ChipButton, Note, Palette
|
||||
from Core import AppConfig, ChildEnvironment, ChipButton, Note, NotificationStyle, Palette
|
||||
from Service import RestartIfRunning
|
||||
from Sortd import Setup, SortdError
|
||||
|
||||
@@ -20,9 +20,12 @@ class App:
|
||||
self.Navigate: Callable[..., None] = lambda Name, **Arguments: None # set by Main
|
||||
|
||||
def Notify(self, Text: str, Kind: str = "info") -> None:
|
||||
Color = {"success": Palette.Green, "error": Palette.Red, "warning": Palette.Yellow}.get(Kind, Palette.Text)
|
||||
Background, Accent = NotificationStyle(Kind)
|
||||
self.Page.show_dialog(ft.SnackBar(
|
||||
ft.Text(Text, color=Color), bgcolor=Palette.Surface0, duration=ft.Duration(seconds=4),
|
||||
content=ft.Text(Text, color=Accent),
|
||||
bgcolor=Background,
|
||||
shape=ft.RoundedRectangleBorder(radius=4, side=ft.BorderSide(1, Accent)),
|
||||
open=True,
|
||||
))
|
||||
|
||||
def LoadSetup(self) -> tuple[Optional[Setup], str]:
|
||||
|
||||
Reference in new issue
Block a user