mirror of
https://git.srhtnin.garden/sarah/SaraView.git
synced 2026-10-14 18:38:11 +02:00
Add live Markdown editing, colours and files in the tree
This commit is contained in:
1 parent
0eecfba224
commit
f851ecd820
15 files changed
+1025
-58
No files matched your search
+3
-1
@@ -67,7 +67,9 @@ def Main(Page: ft.Page) -> None:
|
||||
TheApp.Connect() # its listeners reload the tree and the browser
|
||||
else:
|
||||
Body.update()
|
||||
Tree.Reload() # "Show files in the tree" may have changed
|
||||
TheBrowser.Refresh()
|
||||
Tree.RevealPath(TheBrowser.Root, TheBrowser.Path)
|
||||
|
||||
def ToggleSidebar() -> None:
|
||||
Config.ShowSidebar = not Config.ShowSidebar
|
||||
@@ -85,7 +87,7 @@ def Main(Page: ft.Page) -> None:
|
||||
|
||||
TheBrowser = Browser(TheApp, OnPathChanged, lambda: ShowSettings("Connection" if TheApp.ConnectError else "General"),
|
||||
ToggleSidebar)
|
||||
Tree = Filetree(TheApp, TheBrowser.NavigateTo)
|
||||
Tree = Filetree(TheApp, TheBrowser.NavigateTo, TheBrowser.OpenFile)
|
||||
Divider = ResizeHandle(OnDrag, OnDragEnd)
|
||||
Tree.visible = Divider.visible = Config.ShowSidebar
|
||||
# STRETCH so the divider gets the full height to be dragged along.
|
||||
|
||||
Reference in new issue
Block a user