Expand folder icon choices with common special-folder categories (Documents, Desktop, Games, etc.)

This commit is contained in:
sarah committed 2026-10-08 17:54:02 +02:00
1 parent ec1ff47c34
commit a39533a522
2 files changed
+28 -5

No files matched your search

+6 -1
View File
@@ -1281,7 +1281,12 @@ class Browser(ft.Row):
if self.EntryFilter: if self.EntryFilter:
Entries = [Entry for Entry in Entries if self.EntryFilter(Entry)] Entries = [Entry for Entry in Entries if self.EntryFilter(Entry)]
if self.Config.ShowSearch and self.SearchText: if self.Config.ShowSearch and self.SearchText:
Entries = [Entry for Entry in Entries if self._MatchesSearch(Entry.name)] # Directories never get filtered out, even if their name doesn't
# match — otherwise typing a search hides the very folders you'd
# need to navigate into to find more, making it impossible to go
# anywhere else while a filter is active (the actual bug report:
# "cannot go into directories if there is a search bar").
Entries = [Entry for Entry in Entries if Entry.is_dir() or self._MatchesSearch(Entry.name)]
Entries = self._SortEntries(Entries) Entries = self._SortEntries(Entries)
self.CurrentEntries = Entries self.CurrentEntries = Entries
# A refresh (new/renamed/deleted files) can leave stale paths in the # A refresh (new/renamed/deleted files) can leave stale paths in the
+22 -4
View File
@@ -14,21 +14,39 @@ from Core import ConfigDir
FolderIconsPath = ConfigDir / "FolderIcons.toml" FolderIconsPath = ConfigDir / "FolderIcons.toml"
# Pre-made choices for the icon picker (Features: "Use the pre-made ones"): # Pre-made choices for the icon picker (Features: "Use the pre-made ones" /
# Material's own folder-shape variants first, then a few of Bookmarks' # "add more folder icons (e.g. documents and such)"): Material's own
# thematic set so a folder can be marked by purpose too, not just shape. # folder-shape variants first, then purpose/content icons so a folder can be
# marked by what's in it, not just shape — common special-folder categories
# (Documents, Desktop, Fonts, Games, ...) plus Bookmarks' original set.
FolderIconChoices = [ FolderIconChoices = [
"FOLDER_OUTLINED", "FOLDER_OPEN", "FOLDER_SPECIAL", "FOLDER_SHARED", "FOLDER_OUTLINED", "FOLDER_OPEN", "FOLDER_SPECIAL", "FOLDER_SHARED",
"FOLDER_ZIP", "FOLDER_COPY", "SNIPPET_FOLDER", "RULE_FOLDER", "FOLDER_ZIP", "FOLDER_COPY", "SNIPPET_FOLDER", "RULE_FOLDER",
"STAR_OUTLINE", "FAVORITE_OUTLINE", "WORK_OUTLINE", "HOME_OUTLINED", "STAR_OUTLINE", "FAVORITE_OUTLINE", "WORK_OUTLINE", "HOME_OUTLINED",
"DOWNLOAD_OUTLINED", "IMAGE_OUTLINED", "MUSIC_NOTE_OUTLINED", "DOWNLOAD_OUTLINED", "IMAGE_OUTLINED", "MUSIC_NOTE_OUTLINED",
"VIDEOCAM_OUTLINED", "CODE_OUTLINED", "VIDEOCAM_OUTLINED", "CODE_OUTLINED",
"DESCRIPTION_OUTLINED", "DESKTOP_WINDOWS_OUTLINED", "FONT_DOWNLOAD_OUTLINED",
"SPORTS_ESPORTS_OUTLINED", "BACKUP_OUTLINED", "CLOUD_OUTLINED",
"DELETE_OUTLINE", "SETTINGS_OUTLINED", "MENU_BOOK_OUTLINED", "MAIL_OUTLINE",
"CONTACTS_OUTLINED", "SCHOOL_OUTLINED", "BUSINESS_CENTER_OUTLINED",
"SCIENCE_OUTLINED", "PUBLIC_OUTLINED", "LOCK_OUTLINE", "ATTACH_MONEY_OUTLINED",
"RECEIPT_LONG_OUTLINED", "BUILD_OUTLINED", "EXTENSION_OUTLINED",
] ]
FolderIconLabelOverrides = { FolderIconLabelOverrides = {
"FOLDER_OUTLINED": "Default", "FOLDER_OPEN": "Open", "FOLDER_SPECIAL": "Special", "FOLDER_OUTLINED": "Default", "FOLDER_OPEN": "Open", "FOLDER_SPECIAL": "Special",
"FOLDER_SHARED": "Shared", "FOLDER_ZIP": "Archive", "FOLDER_COPY": "Copy", "FOLDER_SHARED": "Shared", "FOLDER_ZIP": "Archive", "FOLDER_COPY": "Copy",
"SNIPPET_FOLDER": "Snippet", "RULE_FOLDER": "Rules", "SNIPPET_FOLDER": "Snippet", "RULE_FOLDER": "Rules", "VIDEOCAM_OUTLINED": "Videos",
"DESCRIPTION_OUTLINED": "Documents", "DESKTOP_WINDOWS_OUTLINED": "Desktop",
"FONT_DOWNLOAD_OUTLINED": "Fonts", "SPORTS_ESPORTS_OUTLINED": "Games",
"BACKUP_OUTLINED": "Backup", "CLOUD_OUTLINED": "Cloud",
"DELETE_OUTLINE": "Trash", "SETTINGS_OUTLINED": "Config",
"MENU_BOOK_OUTLINED": "Books", "MAIL_OUTLINE": "Mail",
"CONTACTS_OUTLINED": "Contacts", "SCHOOL_OUTLINED": "School",
"BUSINESS_CENTER_OUTLINED": "Business", "SCIENCE_OUTLINED": "Projects",
"PUBLIC_OUTLINED": "Public", "LOCK_OUTLINE": "Private",
"ATTACH_MONEY_OUTLINED": "Finance", "RECEIPT_LONG_OUTLINED": "Receipts",
"BUILD_OUTLINED": "Tools", "EXTENSION_OUTLINED": "Plugins",
} }