mirror of
https://git.srhtnin.garden/sarah/SaraView.git
synced 2026-10-15 02:43:17 +02:00
Graph colours by depth, pan button and directory settings
This commit is contained in:
1 parent
57a07874ee
commit
d97f82beb2
10 files changed
+288
-58
No files matched your search
@@ -117,6 +117,18 @@ def ShowSettingsDialog(TheApp: App, OnSaved: Callable[[bool], None], StartCatego
|
||||
MenuButton = ChipButton("Remove from app menu" if MenuEntryPath.exists() else "Add to app menu", ToggleMenuEntry)
|
||||
MenuButton.visible = bool(AppImagePath)
|
||||
|
||||
# Graph.
|
||||
GraphDirectoriesSwitch = ft.Switch(label="Show directories (off: only files and the links between them)",
|
||||
value=Config.GraphShowDirectories)
|
||||
PanButtonPicker = ft.RadioGroup(
|
||||
ft.Column([
|
||||
ft.Radio(value="Left", label="Left"),
|
||||
ft.Radio(value="Middle", label="Middle (click to grab, move, click again to let go)"),
|
||||
ft.Radio(value="Right", label="Right"),
|
||||
], spacing=0),
|
||||
value=Config.GraphPanButton,
|
||||
)
|
||||
|
||||
# Connection.
|
||||
ModePicker = ft.RadioGroup(
|
||||
ft.Row([ft.Radio(value="Local", label="Local files"), ft.Radio(value="Server", label="SaraView server")]),
|
||||
@@ -205,6 +217,16 @@ def ShowSettingsDialog(TheApp: App, OnSaved: Callable[[bool], None], StartCatego
|
||||
ft.Divider(height=1, color=Palette.Surface1),
|
||||
OwnAppearance,
|
||||
], spacing=12, scroll=ft.ScrollMode.AUTO),
|
||||
"Graph": ft.Column([
|
||||
_Note("The graph view (Ctrl+G): directories in the heading colours by depth, files white, "
|
||||
"joined to their directory and to the files that reference them."),
|
||||
GraphDirectoriesSwitch,
|
||||
ft.Divider(height=1, color=Palette.Surface1),
|
||||
ft.Text("Pan with mouse button"),
|
||||
PanButtonPicker,
|
||||
_Note("Scroll zooms. Flet can't follow a held middle button, so Middle works like "
|
||||
"middle-click autoscroll."),
|
||||
], spacing=12, scroll=ft.ScrollMode.AUTO),
|
||||
"Connection": ft.Column([
|
||||
_Note("Browse a directory on this computer, or connect to a SaraView server."),
|
||||
ModePicker, LocalOptions, ServerOptions,
|
||||
@@ -240,6 +262,8 @@ def ShowSettingsDialog(TheApp: App, OnSaved: Callable[[bool], None], StartCatego
|
||||
Config.ShowSidebar = SidebarSwitch.value
|
||||
Config.ShowFilesInTree = TreeFilesSwitch.value
|
||||
Config.MarkdownEditing = MarkdownEditingPicker.value or Config.MarkdownEditing
|
||||
Config.GraphShowDirectories = GraphDirectoriesSwitch.value
|
||||
Config.GraphPanButton = PanButtonPicker.value or Config.GraphPanButton
|
||||
Config.FontSize = _ReadInt(FontSizeField, Config.FontSize, 8, 32)
|
||||
Config.Mode = ModePicker.value or Config.Mode
|
||||
Config.LocalRoot = (LocalRootField.value or "").strip() or "~"
|
||||
|
||||
Reference in new issue
Block a user