Skip to content

armgit / Filee

Public Imported from GitHub
0

Free, open-source file converter. Convert 263 formats offline by drag & drop — images, PDF, Word, Excel, PowerPoint, HWP/HWPX, video, audio, e-books and archives. No upload, no Office needed.

fix(theme): address PR review feedback for Material You theme

gtxPrimecffd137eaeef
diff --git a/docs/CUSTOM-THEMES.md b/docs/CUSTOM-THEMES.md
index 411a4885..7e6950fc 100644
--- a/docs/CUSTOM-THEMES.md
+++ b/docs/CUSTOM-THEMES.md
@@ -35,6 +35,9 @@ Filee's own colours can be replaced with a `theme.json` file in the folder that
Keep `text` and `textSecondary` readable on `page`, `surface` and `surfaceAlt`: they are drawn on all three.
-Keep `dark` colours dark and `light` colours light. Text boxes, drop-downs, check boxes, menus, tooltips and plain
-buttons come from Avalonia's Fluent theme and keep its standard light/dark look; they do not follow `theme.json`. A
-white `page` in the `dark` variant would put white-on-white text boxes on it.
+Keep `dark` colours dark and `light` colours light. In Filee's default Soft style, text boxes,
+drop-downs, check boxes, menus, tooltips and plain buttons come from Avalonia's Fluent theme and
+keep its standard light/dark look; they do not follow `theme.json`. Under the Material You style,
+text boxes, drop-downs and check boxes follow the dynamic tonal surface colors and corner radii
+from `theme.json` and the accent colour. A white `page` in the `dark` variant would put white-on-white
+controls on it.
diff --git a/src/Filee.App/Assets/i18n/ar.json b/src/Filee.App/Assets/i18n/ar.json
index bc840c4e..a1cdf17a 100644
--- a/src/Filee.App/Assets/i18n/ar.json
+++ b/src/Filee.App/Assets/i18n/ar.json
@@ -23,7 +23,6 @@
"close.dont_ask": "عدم السؤال مجددًا",
"home.title": "الرئيسية",
"home.drop_title": "أفلت الملفات هنا",
- "home.drop_select": "انقر نقرًا مزدوجًا لتحديد الملفات",
"home.drop_hint": "أو اضغط باستمرار على {0} أثناء سحب الملفات في مستكشف الملفات. يفتح شريط الأدوات الدائري عند المؤشر.",
"home.drop_hint_macos": "أو اضغط باستمرار على {0} أثناء سحب الملفات في Finder. يفتح شريط الأدوات الدائري عند المؤشر.",
"home.drop_hint_linux": "أو اضغط باستمرار على {0} أثناء سحب الملفات في مدير الملفات. يفتح شريط الأدوات الدائري عند المؤشر.",
@@ -903,5 +902,7 @@
"whats_new.2_0_0.languages.title": "لغات إضافية في Filee",
"whats_new.2_0_0.languages.text": "تتوفر الآن الإسبانية والهندية واليابانية والروسية والعربية والبرتغالية البرازيلية، إلى جانب الإنجليزية والكورية والصينية والبولندية.",
"whats_new.2_0_0.more.title": "والمزيد من التحسينات",
- "whats_new.2_0_0.more.text": "يمكنك إعادة قائمة دائرية واحدة إلى إعداداتها الافتراضية، والبحث في سجل التحويلات بالكامل، وتحويل المستندات الغوجاراتية والهندية والعربية باستخدام LibreOffice."
+ "whats_new.2_0_0.more.text": "يمكنك إعادة قائمة دائرية واحدة إلى إعداداتها الافتراضية، والبحث في سجل التحويلات بالكامل، وتحويل المستندات الغوجاراتية والهندية والعربية باستخدام LibreOffice.",
+ "theme.style.m3_badge": "Material 3",
+ "theme.style.m3_tag": "M3"
}
diff --git a/src/Filee.App/Assets/i18n/en.json b/src/Filee.App/Assets/i18n/en.json
index 9893a0b6..88791263 100644
--- a/src/Filee.App/Assets/i18n/en.json
+++ b/src/Filee.App/Assets/i18n/en.json
@@ -1,7 +1,6 @@
{
"app.name": "Filee",
"app.tagline": "Drag, drop, converted.",
-
"nav.home": "Home",
"nav.general": "General",
"nav.triggers": "Shortcuts",
@@ -11,7 +10,6 @@
"nav.theme": "Theme",
"nav.engines": "Engines",
"nav.about": "About",
-
"tray.open": "Open Filee",
"tray.pause": "Pause shortcuts",
"tray.resume": "Resume shortcuts",
@@ -23,10 +21,8 @@
"close.tray": "Keep in tray",
"close.quit": "Quit",
"close.dont_ask": "Don't ask again",
-
"home.title": "Home",
"home.drop_title": "Drop files here",
- "home.drop_select": "Double-click to select files",
"home.drop_hint": "Or hold {0} while dragging files in Explorer. The donut toolbar opens at your cursor.",
"home.drop_hint_macos": "Or hold {0} while dragging files in Finder. The donut toolbar opens at your cursor.",
"home.drop_hint_linux": "Or hold {0} while dragging files in your file manager. The donut toolbar opens at your cursor.",
@@ -47,7 +43,6 @@
"home.clear_history": "Clear",
"home.files": "{0} files",
"home.failed_files": "{0} failed",
-
"donut.center_drag": "Bring files here",
"donut.files_same": "{0} × {1}",
"donut.files_mixed": "{0} files",
@@ -63,7 +58,6 @@
"donut.group_caption": "Group of {0}",
"donut.flip_to_back": "{0} ↻ back",
"donut.flip_to_front": "{0} ↻ front",
-
"toast.converting": "{0} → {1}",
"toast.done": "Done",
"toast.done_errors": "{0} of {1} failed",
@@ -74,7 +68,6 @@
"toast.cancel": "Cancel",
"download.badge": "{0}/s · {1}",
"download.badge_files": "{0} · {1} of {2} files",
-
"error.unsupported_source": "This file type isn't supported",
"error.empty_file": "The file is empty (0 bytes). A file made with “New” in the right-click menu stays empty until you open it in its app and save it",
"format_request.request": "Request this format",
@@ -114,7 +107,6 @@
"notice.geo_rows_without_location": "Some rows have no usable location and were kept without a shape",
"notice.geo_field_names": "Shapefile field names are 10 characters at most: some were shortened",
"notice.geo_shapefile_split": "A Shapefile holds one kind of shape, so points, lines and polygons were saved as separate files",
-
"engine.reason.not_installed": "Not installed",
"engine.reason.error": "Error while checking",
"engine.reason.unsupported_platform": "Not available on this platform",
@@ -148,7 +140,6 @@
"engine.ghostscript.description": "EPS, PostScript and older Illustrator files to PDF and images; PDF to EPS and PS.",
"engine.calibre.description": "Rare e-book formats (LIT, LRF, CHM, PDB, RB…) and Kindle output (MOBI, AZW3).\nAbove the HWPX writer, it also makes the PDFs of e-books (much faster for long books).",
"engine.libreoffice.description": "Reads older and less common formats: DOC, PPT, Pages, Keynote, Numbers, WordPerfect, ClarisWorks, Publisher, Visio…\nAlso saves as DOC, XLS, PPT, ODT, ODP, OpenDocument templates and EMF.",
-
"profile.images": "Images",
"profile.pdf": "PDF",
"profile.office": "Documents",
@@ -168,7 +159,6 @@
"profile.models": "3D models",
"profile.geo": "Geospatial",
"profile.mixed": "Mixed files",
-
"preset.crop": "Crop",
"crop.save": "Crop & Save",
"crop.reset": "Reset",
@@ -190,7 +180,6 @@
"crop.state_done": "Cropped",
"crop.state_skipped": "Skipped",
"crop.state_failed": "Failed",
-
"preset.half_size": "Half size",
"preset.grayscale": "Grayscale",
"preset.remove_background": "Remove background",
@@ -223,7 +212,6 @@
"preset.extract_motion": "Extract Live Photo video",
"preset.live_photo_iphone": "Live Photo (iPhone)",
"preset.motion_photo_android": "Motion Photo (Android)",
-
"format.folder": "Folder",
"format.category.Image": "Image",
"format.category.Pdf": "PDF",
@@ -243,7 +231,6 @@
"format.category.Data": "Data",
"format.category.Model3D": "3D model",
"format.category.Geo": "Geospatial",
-
"general.title": "General",
"general.language": "Language",
"general.language_auto": "System default",
@@ -322,7 +309,6 @@
"general.reset_library": "Reset to defaults",
"general.reset_confirm": "Replace all presets and toolbar profiles with the defaults?",
"general.imported": "Imported {0} items",
-
"triggers.title": "Shortcuts",
"triggers.description": "Choose how the donut toolbar opens. You can add as many gestures as you like.",
"triggers.macos_permissions": "Allow Filee in System Settings > Privacy & Security > Accessibility.\nFinder also asks for Automation permission the first time you use a selection shortcut.",
@@ -375,7 +361,6 @@
"triggers.excluded_none_running": "No other app has a window open.",
"triggers.excluded_note": "Gestures and shortcuts do nothing while the pointer is over these apps.",
"triggers.paused": "Shortcuts are paused",
-
"toolbar.title": "Donut toolbar",
"toolbar.step_profile": "1. Choose a profile",
"toolbar.step_arrange": "2. Arrange presets",
@@ -437,7 +422,6 @@
"toolbar.mixed_others": "Other mixes of files open “{0}”.",
"toolbar.mixed_others_self": "No mixed profile is left with nothing checked, so this one is also used for every other mix.",
"tags.remove": "Remove",
-
"presets.title": "Presets",
"presets.add": "New",
"presets.duplicate": "Duplicate",
@@ -610,7 +594,6 @@
"presets.delete_confirm": "Delete “{0}”? It will also be removed from every toolbar and group.",
"presets.name_required": "Enter a name",
"presets.select": "Select a preset to edit it",
-
"theme.title": "Theme",
"theme.style": "Theme style",
"theme.style.Soft": "Filee Soft",
@@ -638,7 +621,6 @@
"theme.reduce_motion": "Reduce animations",
"theme.reduce_motion_hint": "Recommended for older PCs. Turns off transitions and the donut's bounce.",
"theme.preview": "Preview",
-
"engines.title": "Conversion engines",
"engines.description": "Filee picks the best available engine for each conversion.\nWhen several can do the same job, the higher one wins.",
"engines.available": "Ready",
@@ -709,7 +691,6 @@
"engines.state.unpacking": "Installing…",
"engines.state.installed": "Installed",
"engines.state.failed": "Failed: {0}",
-
"about.title": "About",
"about.updates": "Updates",
"common.search": "Search",
@@ -734,7 +715,6 @@
"feedback.notice_text": "A star on GitHub helps other people find Filee.\nProblems and ideas are welcome too.",
"feedback.star": "Star on GitHub",
"feedback.issue": "Report a problem or idea",
-
"common.ok": "OK",
"common.cancel": "Cancel",
"common.save": "Save",
@@ -744,7 +724,6 @@
"common.no": "No",
"common.on": "On",
"common.off": "Off",
-
"setup.title": "Choose conversion engines",
"setup.description": "Images, PDF, Office documents, HWP, e-books, archives, fonts, CAD and 3D models already convert.\nDownload engines only for video and audio or rare formats.",
"setup.note": "You can install or remove engines at any time in Settings → Engines.",
@@ -905,7 +884,6 @@
"watch.status_starting": "Starting…",
"watch.status_error": "Can't watch this folder: {0}",
"watch.cli_hint": "Also on the command line: filee watch <folder> --to <format>",
-
"whats_new.title": "What's new in Filee {0}",
"whats_new.previous": "Previous",
"whats_new.next": "Next",
@@ -924,5 +902,7 @@
"whats_new.2_0_0.languages.title": "Filee speaks more languages",
"whats_new.2_0_0.languages.text": "Spanish, Hindi, Japanese, Russian, Arabic and Brazilian Portuguese join English, Korean, Chinese and Polish.",
"whats_new.2_0_0.more.title": "And a little more",
- "whats_new.2_0_0.more.text": "Reset a single donut to its defaults, search your whole history, and convert Gujarati, Hindi or Arabic documents through LibreOffice."
+ "whats_new.2_0_0.more.text": "Reset a single donut to its defaults, search your whole history, and convert Gujarati, Hindi or Arabic documents through LibreOffice.",
+ "theme.style.m3_badge": "Material 3",
+ "theme.style.m3_tag": "M3"
}
diff --git a/src/Filee.App/Assets/i18n/es.json b/src/Filee.App/Assets/i18n/es.json
index ffab1c59..175bc40a 100644
--- a/src/Filee.App/Assets/i18n/es.json
+++ b/src/Filee.App/Assets/i18n/es.json
@@ -23,7 +23,6 @@
"close.dont_ask": "No volver a preguntar",
"home.title": "Inicio",
"home.drop_title": "Suelta archivos aquí",
- "home.drop_select": "Doble clic para seleccionar archivos",
"home.drop_hint": "O mantén {0} mientras arrastras archivos en el Explorador. El menú circular se abre donde esté el cursor.",
"home.drop_hint_macos": "O mantén {0} mientras arrastras archivos en Finder. El menú circular se abre donde esté el cursor.",
"home.drop_hint_linux": "O mantén {0} mientras arrastras archivos en tu gestor de archivos. El menú circular se abre donde esté el cursor.",
@@ -885,7 +884,6 @@
"watch.status_starting": "Iniciando…",
"watch.status_error": "No se puede supervisar esta carpeta: {0}",
"watch.cli_hint": "También en la línea de comandos: filee watch <carpeta> --to <formato>",
-
"whats_new.title": "Novedades de Filee {0}",
"whats_new.previous": "Anterior",
"whats_new.next": "Siguiente",
@@ -904,5 +902,7 @@
"whats_new.2_0_0.languages.title": "Filee habla más idiomas",
"whats_new.2_0_0.languages.text": "El español, el hindi, el japonés, el ruso, el árabe y el portugués de Brasil se suman al inglés, el coreano, el chino y el polaco.",
"whats_new.2_0_0.more.title": "Y un poco más",
- "whats_new.2_0_0.more.text": "Restablece un solo menú circular, busca en todo tu historial y convierte documentos en guyaratí, hindi o árabe con LibreOffice."
+ "whats_new.2_0_0.more.text": "Restablece un solo menú circular, busca en todo tu historial y convierte documentos en guyaratí, hindi o árabe con LibreOffice.",
+ "theme.style.m3_badge": "Material 3",
+ "theme.style.m3_tag": "M3"
}
diff --git a/src/Filee.App/Assets/i18n/hi.json b/src/Filee.App/Assets/i18n/hi.json
index f665713f..09a47a73 100644
--- a/src/Filee.App/Assets/i18n/hi.json
+++ b/src/Filee.App/Assets/i18n/hi.json
@@ -23,7 +23,6 @@
"close.dont_ask": "दोबारा न पूछें",
"home.title": "होम",
"home.drop_title": "फ़ाइलें यहाँ छोड़ें",
- "home.drop_select": "फ़ाइलें चुनने के लिए डबल-क्लिक करें",
"home.drop_hint": "या Explorer में फ़ाइलें खींचते समय {0} दबाए रखें। डोनट टूलबार आपके कर्सर पर खुलेगा।",
"home.drop_hint_macos": "या Finder में फ़ाइलें खींचते समय {0} दबाए रखें। डोनट टूलबार आपके कर्सर पर खुलेगा।",
"home.drop_hint_linux": "या अपने फ़ाइल मैनेजर में फ़ाइलें खींचते समय {0} दबाए रखें। डोनट टूलबार आपके कर्सर पर खुलेगा।",
@@ -885,7 +884,6 @@
"watch.status_starting": "शुरू हो रहा है…",
"watch.status_error": "इस फ़ोल्डर को नहीं देखा जा सकता: {0}",
"watch.cli_hint": "कमांड लाइन पर भी: filee watch <folder> --to <format>",
-
"whats_new.title": "Filee {0} में नया क्या है",
"whats_new.previous": "पिछला",
"whats_new.next": "अगला",
@@ -904,5 +902,7 @@
"whats_new.2_0_0.languages.title": "Filee अब और भाषाएँ बोलता है",
"whats_new.2_0_0.languages.text": "अंग्रेज़ी, कोरियाई, चीनी और पोलिश के साथ अब स्पैनिश, हिन्दी, जापानी, रूसी, अरबी और ब्राज़ीलियाई पुर्तगाली भी।",
"whats_new.2_0_0.more.title": "और भी थोड़ा",
- "whats_new.2_0_0.more.text": "एक ही डोनट को डिफ़ॉल्ट पर रीसेट करें, पूरा इतिहास खोजें, और गुजराती, हिन्दी या अरबी दस्तावेज़ LibreOffice से बदलें।"
+ "whats_new.2_0_0.more.text": "एक ही डोनट को डिफ़ॉल्ट पर रीसेट करें, पूरा इतिहास खोजें, और गुजराती, हिन्दी या अरबी दस्तावेज़ LibreOffice से बदलें।",
+ "theme.style.m3_badge": "Material 3",
+ "theme.style.m3_tag": "M3"
}
diff --git a/src/Filee.App/Assets/i18n/ja.json b/src/Filee.App/Assets/i18n/ja.json
index 73b3989e..326dd171 100644
--- a/src/Filee.App/Assets/i18n/ja.json
+++ b/src/Filee.App/Assets/i18n/ja.json
@@ -23,7 +23,6 @@
"close.dont_ask": "次回から確認しない",
"home.title": "ホーム",
"home.drop_title": "ここにファイルをドロップ",
- "home.drop_select": "ダブルクリックしてファイルを選択",
"home.drop_hint": "または、{0}を押しながら\nエクスプローラーでファイルをドラッグしてください。\nカーソル位置にドーナツメニューが開きます。",
"home.drop_hint_macos": "または、{0}を押しながら\nFinderでファイルをドラッグしてください。\nカーソル位置にドーナツメニューが開きます。",
"home.drop_hint_linux": "または、{0}を押しながら\nファイルマネージャーでファイルをドラッグしてください。\nカーソル位置にドーナツメニューが開きます。",
@@ -885,7 +884,6 @@
"watch.status_starting": "開始中…",
"watch.status_error": "このフォルダーを監視できません:{0}",
"watch.cli_hint": "コマンドラインからも使えます:filee watch <folder> --to <format>",
-
"whats_new.title": "Filee {0} の新機能",
"whats_new.previous": "前へ",
"whats_new.next": "次へ",
@@ -904,5 +902,7 @@
"whats_new.2_0_0.languages.title": "対応言語が増えました",
"whats_new.2_0_0.languages.text": "英語、韓国語、中国語、ポーランド語に、スペイン語、ヒンディー語、日本語、ロシア語、アラビア語、ブラジルポルトガル語が加わりました。",
"whats_new.2_0_0.more.title": "ほかにも",
- "whats_new.2_0_0.more.text": "ドーナツを 1 つだけ既定に戻す、履歴全体を検索する、グジャラート語・ヒンディー語・アラビア語の文書を LibreOffice で変換する、など。"
+ "whats_new.2_0_0.more.text": "ドーナツを 1 つだけ既定に戻す、履歴全体を検索する、グジャラート語・ヒンディー語・アラビア語の文書を LibreOffice で変換する、など。",
+ "theme.style.m3_badge": "Material 3",
+ "theme.style.m3_tag": "M3"
}
diff --git a/src/Filee.App/Assets/i18n/ko.json b/src/Filee.App/Assets/i18n/ko.json
index fbbf7d29..588a87be 100644
--- a/src/Filee.App/Assets/i18n/ko.json
+++ b/src/Filee.App/Assets/i18n/ko.json
@@ -1,7 +1,6 @@
{
"app.name": "Filee",
"app.tagline": "끌어서 놓으면, 변환 끝.",
-
"nav.home": "홈",
"nav.general": "일반",
"nav.triggers": "단축키",
@@ -11,7 +10,6 @@
"nav.theme": "테마",
"nav.engines": "변환 엔진",
"nav.about": "정보",
-
"tray.open": "Filee 열기",
"tray.pause": "단축키 일시 중지",
"tray.resume": "단축키 다시 사용",
@@ -23,10 +21,8 @@
"close.tray": "트레이에 유지",
"close.quit": "종료",
"close.dont_ask": "다시 묻지 않기",
-
"home.title": "홈",
"home.drop_title": "여기에 파일을 놓으세요",
- "home.drop_select": "더블클릭하여 파일 선택",
"home.drop_hint": "또는 탐색기에서 {0} 키를 누른 채 파일을 드래그하면 커서 위치에 원형 툴바가 열려요.",
"home.drop_hint_macos": "또는 Finder에서 {0} 키를 누른 채 파일을 드래그하면 커서 위치에 원형 툴바가 열려요.",
"home.drop_hint_linux": "또는 파일 관리자에서 {0} 키를 누른 채 파일을 드래그하면 커서 위치에 원형 툴바가 열려요.",
@@ -47,7 +43,6 @@
"home.clear_history": "지우기",
"home.files": "파일 {0}개",
"home.failed_files": "{0}개 실패",
-
"donut.center_drag": "파일을 이쪽으로",
"donut.files_same": "{1} {0}개",
"donut.files_mixed": "파일 {0}개",
@@ -63,7 +58,6 @@
"donut.group_caption": "묶음 · {0}개",
"donut.flip_to_back": "{0} ↻ 뒷면",
"donut.flip_to_front": "{0} ↻ 앞면",
-
"toast.converting": "{0} → {1}",
"toast.done": "완료",
"toast.done_errors": "{1}개 중 {0}개 실패",
@@ -74,7 +68,6 @@
"toast.cancel": "취소",
"download.badge": "{0}/s · {1}",
"download.badge_files": "{0} · {2}개 중 {1}번째",
-
"error.unsupported_source": "지원하지 않는 파일 형식이에요",
"error.empty_file": "빈 파일이에요(0바이트). 우클릭 메뉴의 “새로 만들기”로 만든 파일은 앱에서 열어 저장해야 내용이 생겨요",
"format_request.request": "이 형식 요청하기",
@@ -114,7 +107,6 @@
"notice.geo_rows_without_location": "위치를 읽을 수 없는 행은 도형 없이 저장했어요",
"notice.geo_field_names": "Shapefile 필드 이름은 10자까지라서 일부를 줄였어요",
"notice.geo_shapefile_split": "Shapefile은 한 종류의 도형만 담아서 점·선·면을 파일로 나눠 저장했어요",
-
"engine.reason.not_installed": "설치되지 않음",
"engine.reason.error": "확인 중 오류",
"engine.reason.unsupported_platform": "이 플랫폼에서는 사용할 수 없음",
@@ -148,7 +140,6 @@
"engine.ghostscript.description": "EPS, 포스트스크립트, 예전 일러스트레이터 파일을 PDF와 이미지로, PDF를 EPS·PS로.",
"engine.calibre.description": "드문 전자책 형식(LIT, LRF, CHM, PDB, RB…)과 킨들용 출력(MOBI, AZW3).\nHWPX writer보다 위에 두면 전자책 PDF도 만들어요(긴 책은 훨씬 빨라요).",
"engine.libreoffice.description": "DOC, PPT, Pages, Keynote, Numbers, 워드퍼펙트, ClarisWorks, Publisher, Visio 같은 오래되었거나 드문 형식을 읽어요.\nDOC·XLS·PPT·ODT·ODP, 오픈도큐먼트 서식 파일, EMF로 저장도 해요.",
-
"profile.images": "이미지",
"profile.pdf": "PDF",
"profile.office": "문서",
@@ -168,7 +159,6 @@
"profile.models": "3D 모델",
"profile.geo": "지리 정보 (GIS)",
"profile.mixed": "혼합 파일",
-
"preset.crop": "자르기",
"crop.save": "자르기 및 저장",
"crop.reset": "초기화",
@@ -190,7 +180,6 @@
"crop.state_done": "자르기 완료",
"crop.state_skipped": "건너뜀",
"crop.state_failed": "실패",
-
"preset.half_size": "50% 축소",
"preset.grayscale": "흑백",
"preset.remove_background": "배경 제거",
@@ -223,7 +212,6 @@
"preset.extract_motion": "라이브 포토 동영상 추출",
"preset.live_photo_iphone": "라이브 포토 (아이폰)",
"preset.motion_photo_android": "모션 포토 (안드로이드)",
-
"format.folder": "폴더",
"format.category.Image": "이미지",
"format.category.Pdf": "PDF",
@@ -243,7 +231,6 @@
"format.category.Data": "데이터",
"format.category.Model3D": "3D 모델",
"format.category.Geo": "지리 정보",
-
"general.title": "일반",
"general.language": "언어",
"general.language_auto": "시스템 기본값",
@@ -322,7 +309,6 @@
"general.reset_library": "기본값으로 초기화",
"general.reset_confirm": "모든 프리셋과 툴바 프로필을 기본값으로 바꿀까요?",
"general.imported": "{0}개 항목을 가져왔어요",
-
"triggers.title": "단축키",
"triggers.description": "원형 툴바를 여는 방법을 정하세요. 제스처는 원하는 만큼 추가할 수 있어요.",
"triggers.macos_permissions": "시스템 설정 > 개인정보 보호 및 보안 > 손쉬운 사용에서 Filee를 허용해 주세요.\n선택 파일 단축키를 처음 쓸 때 Finder 자동화 권한도 요청해요.",
@@ -375,7 +361,6 @@
"triggers.excluded_none_running": "창이 열린 다른 앱이 없어요.",
"triggers.excluded_note": "마우스가 이 앱 위에 있으면 제스처와 단축키가 동작하지 않아요.",
"triggers.paused": "단축키가 일시 중지되었어요",
-
"toolbar.title": "원형 툴바",
"toolbar.step_profile": "1. 프로필 선택",
"toolbar.step_arrange": "2. 프리셋 배치",
@@ -437,7 +422,6 @@
"toolbar.mixed_others": "그 밖의 혼합 선택에는 “{0}”이(가) 열려요.",
"toolbar.mixed_others_self": "아무것도 체크하지 않은 혼합 프로필이 없어서 그 밖의 혼합 선택에도 이 프로필이 쓰여요.",
"tags.remove": "빼기",
-
"presets.title": "프리셋",
"presets.add": "새로 만들기",
"presets.duplicate": "복제",
@@ -610,7 +594,6 @@
"presets.delete_confirm": "“{0}”을(를) 삭제할까요? 모든 툴바와 묶음에서도 빠져요.",
"presets.name_required": "이름을 입력하세요",
"presets.select": "편집할 프리셋을 선택하세요",
-
"theme.title": "테마",
"theme.style": "테마 스타일",
"theme.style.Soft": "Filee Soft",
@@ -638,7 +621,6 @@
"theme.reduce_motion": "애니메이션 줄이기",
"theme.reduce_motion_hint": "저사양 PC에 권장해요. 전환 효과와 도넛의 튕김 효과를 꺼요.",
"theme.preview": "미리보기",
-
"engines.title": "변환 엔진",
"engines.description": "Filee는 변환마다 쓸 수 있는 엔진 중 가장 좋은 것을 골라요.\n여러 엔진이 같은 변환을 할 수 있으면 목록 위쪽이 우선이에요.",
"engines.available": "사용 가능",
@@ -709,7 +691,6 @@
"engines.state.unpacking": "설치하는 중…",
"engines.state.installed": "설치됨",
"engines.state.failed": "실패: {0}",
-
"about.title": "정보",
"about.updates": "업데이트",
"common.search": "검색",
@@ -734,7 +715,6 @@
"feedback.notice_text": "GitHub 별(⭐)은 다른 분들이 Filee를 찾는 데 큰 도움이 돼요.\n불편한 점이나 원하는 기능도 알려 주세요.",
"feedback.star": "GitHub에서 별 주기",
"feedback.issue": "문제 신고 · 기능 제안",
-
"common.ok": "확인",
"common.cancel": "취소",
"common.save": "저장",
@@ -744,7 +724,6 @@
"common.no": "아니요",
"common.on": "켬",
"common.off": "끔",
-
"setup.title": "변환 엔진 선택",
"setup.description": "이미지, PDF, 오피스 문서, HWP, 전자책, 압축 파일, 글꼴, CAD, 3D 모델은 지금 바로 변환돼요.\n동영상·오디오나 드문 형식이 필요할 때만 엔진을 받으세요.",
"setup.note": "엔진은 언제든 설정 → 변환 엔진에서 설치하거나 제거할 수 있어요.",
@@ -905,7 +884,6 @@
"watch.status_starting": "시작하는 중…",
"watch.status_error": "이 폴더를 감시할 수 없어요: {0}",
"watch.cli_hint": "명령줄에서도 쓸 수 있어요: filee watch <폴더> --to <형식>",
-
"whats_new.title": "Filee {0}의 새 기능",
"whats_new.previous": "이전",
"whats_new.next": "다음",
@@ -924,5 +902,7 @@
"whats_new.2_0_0.languages.title": "더 많은 언어",
"whats_new.2_0_0.languages.text": "영어, 한국어, 중국어, 폴란드어에 스페인어, 힌디어, 일본어, 러시아어, 아랍어, 브라질 포르투갈어가 더해졌어요.",
"whats_new.2_0_0.more.title": "그리고 조금 더",
- "whats_new.2_0_0.more.text": "원형 툴바 하나만 기본값으로 초기화하고, 기록 전체를 검색하고, 구자라트어·힌디어·아랍어 문서를 LibreOffice로 변환할 수 있어요."
+ "whats_new.2_0_0.more.text": "원형 툴바 하나만 기본값으로 초기화하고, 기록 전체를 검색하고, 구자라트어·힌디어·아랍어 문서를 LibreOffice로 변환할 수 있어요.",
+ "theme.style.m3_badge": "Material 3",
+ "theme.style.m3_tag": "M3"
}
diff --git a/src/Filee.App/Assets/i18n/pl.json b/src/Filee.App/Assets/i18n/pl.json
index 516d46e7..c7ea91e8 100644
--- a/src/Filee.App/Assets/i18n/pl.json
+++ b/src/Filee.App/Assets/i18n/pl.json
@@ -1,7 +1,6 @@
{
"app.name": "Filee",
"app.tagline": "Przeciągnij, upuść, gotowe.",
-
"nav.home": "Start",
"nav.general": "Ogólne",
"nav.triggers": "Skróty",
@@ -11,7 +10,6 @@
"nav.theme": "Motyw",
"nav.engines": "Silniki",
"nav.about": "O programie",
-
"tray.open": "Otwórz Filee",
"tray.pause": "Wstrzymaj skróty",
"tray.resume": "Wznów skróty",
@@ -23,10 +21,8 @@
"close.tray": "Zostaw w zasobniku",
"close.quit": "Zakończ",
"close.dont_ask": "Nie pytaj ponownie",
-
"home.title": "Start",
"home.drop_title": "Upuść pliki tutaj",
- "home.drop_select": "Kliknij dwukrotnie, aby wybrać pliki",
"home.drop_hint": "Albo przytrzymaj {0}, przeciągając pliki w Eksploratorze. Pasek-pierścień otworzy się przy kursorze.",
"home.drop_hint_macos": "Albo przytrzymaj {0}, przeciągając pliki w Finderze. Pasek-pierścień otworzy się przy kursorze.",
"home.drop_hint_linux": "Albo przytrzymaj {0}, przeciągając pliki w menedżerze plików. Pasek-pierścień otworzy się przy kursorze.",
@@ -47,7 +43,6 @@
"home.clear_history": "Wyczyść",
"home.files": "Pliki: {0}",
"home.failed_files": "Błędy: {0}",
-
"donut.center_drag": "Przenieś pliki tutaj",
"donut.files_same": "{0} × {1}",
"donut.files_mixed": "Pliki: {0}",
@@ -63,7 +58,6 @@
"donut.group_caption": "Grupa: {0}",
"donut.flip_to_back": "{0} ↻ tył",
"donut.flip_to_front": "{0} ↻ przód",
-
"toast.converting": "{0} → {1}",
"toast.done": "Gotowe",
"toast.done_errors": "Nieudane: {0} z {1}",
@@ -74,7 +68,6 @@
"toast.cancel": "Anuluj",
"download.badge": "{0}/s · {1}",
"download.badge_files": "{0} · plik {1} z {2}",
-
"error.unsupported_source": "Ten typ pliku nie jest obsługiwany",
"error.empty_file": "Plik jest pusty (0 bajtów). Plik utworzony przez „Nowy” w menu kontekstowym pozostaje pusty, dopóki nie otworzysz go w jego aplikacji i nie zapiszesz",
"format_request.request": "Poproś o ten format",
@@ -114,7 +107,6 @@
"notice.geo_rows_without_location": "Wiersze bez odczytywalnego położenia zapisano bez kształtu",
"notice.geo_field_names": "Nazwy pól Shapefile mają najwyżej 10 znaków: niektóre skrócono",
"notice.geo_shapefile_split": "Shapefile przechowuje jeden rodzaj kształtu, więc punkty, linie i poligony zapisano w osobnych plikach",
-
"engine.reason.not_installed": "Nie zainstalowano",
"engine.reason.error": "Błąd podczas sprawdzania",
"engine.reason.unsupported_platform": "Niedostępne na tej platformie",
@@ -148,7 +140,6 @@
"engine.ghostscript.description": "EPS, PostScript i starsze pliki Illustratora do PDF i obrazów; PDF do EPS i PS.",
"engine.calibre.description": "Rzadkie formaty e-booków (LIT, LRF, CHM, PDB, RB…) i zapis dla Kindle (MOBI, AZW3).\nUmieszczony nad HWPX writer tworzy też PDF-y e-booków (znacznie szybciej przy długich książkach).",
"engine.libreoffice.description": "Odczytuje starsze i rzadsze formaty: DOC, PPT, Pages, Keynote, Numbers, WordPerfect, ClarisWorks, Publisher, Visio…\nZapisuje też jako DOC, XLS, PPT, ODT, ODP, szablony OpenDocument i EMF.",
-
"profile.images": "Obrazy",
"profile.pdf": "PDF",
"profile.office": "Dokumenty",
@@ -168,7 +159,6 @@
"profile.models": "Modele 3D",
"profile.geo": "Geoprzestrzenne",
"profile.mixed": "Różne pliki",
-
"preset.crop": "Kadruj",
"crop.save": "Kadruj i zapisz",
"crop.reset": "Resetuj",
@@ -190,7 +180,6 @@
"crop.state_done": "Wykadrowany",
"crop.state_skipped": "Pominięty",
"crop.state_failed": "Błąd",
-
"preset.half_size": "Połowa rozmiaru",
"preset.grayscale": "Skala szarości",
"preset.remove_background": "Usuń tło",
@@ -223,7 +212,6 @@
"preset.extract_motion": "Wyodrębnij wideo z Live Photo",
"preset.live_photo_iphone": "Live Photo (iPhone)",
"preset.motion_photo_android": "Motion Photo (Android)",
-
"format.folder": "Folder",
"format.category.Image": "Obraz",
"format.category.Pdf": "PDF",
@@ -243,7 +231,6 @@
"format.category.Data": "Dane",
"format.category.Model3D": "Model 3D",
"format.category.Geo": "Geoprzestrzenne",
-
"general.title": "Ogólne",
"general.language": "Język",
"general.language_auto": "Domyślny systemu",
@@ -322,7 +309,6 @@
"general.reset_library": "Przywróć domyślne",
"general.reset_confirm": "Zastąpić wszystkie ustawienia wstępne i profile pasków domyślnymi?",
"general.imported": "Zaimportowano elementów: {0}",
-
"triggers.title": "Skróty",
"triggers.description": "Wybierz, jak otwiera się pasek-pierścień. Możesz dodać dowolnie wiele gestów.",
"triggers.macos_permissions": "Zezwól Filee w Ustawienia systemowe > Prywatność i ochrona > Dostępność.\nFinder poprosi też o uprawnienie Automatyzacji przy pierwszym użyciu skrótu zaznaczenia.",
@@ -375,7 +361,6 @@
"triggers.excluded_none_running": "Żadna inna aplikacja nie ma otwartego okna.",
"triggers.excluded_note": "Gesty i skróty nic nie robią, gdy wskaźnik jest nad tymi aplikacjami.",
"triggers.paused": "Skróty są wstrzymane",
-
"toolbar.title": "Pasek-pierścień",
"toolbar.step_profile": "1. Wybierz profil",
"toolbar.step_arrange": "2. Ułóż ustawienia",
@@ -437,7 +422,6 @@
"toolbar.mixed_others": "Inne mieszanki plików otwierają „{0}”.",
"toolbar.mixed_others_self": "Nie został żaden mieszany profil bez zaznaczeń, więc ten jest używany także dla każdej innej mieszanki.",
"tags.remove": "Usuń",
-
"presets.title": "Ustawienia wstępne",
"presets.add": "Nowe",
"presets.duplicate": "Duplikuj",
@@ -610,7 +594,6 @@
"presets.delete_confirm": "Usunąć „{0}”? Zostanie też usunięte z każdego paska i grupy.",
"presets.name_required": "Podaj nazwę",
"presets.select": "Wybierz ustawienie, aby je edytować",
-
"theme.title": "Motyw",
"theme.style": "Styl motywu",
"theme.style.Soft": "Filee Soft",
@@ -638,7 +621,6 @@
"theme.reduce_motion": "Ogranicz animacje",
"theme.reduce_motion_hint": "Zalecane na starszych komputerach. Wyłącza przejścia i odbijanie pierścienia.",
"theme.preview": "Podgląd",
-
"engines.title": "Silniki konwersji",
"engines.description": "Filee wybiera najlepszy dostępny silnik dla każdej konwersji.\nGdy kilka potrafi to samo, wygrywa wyższy.",
"engines.available": "Gotowy",
@@ -709,7 +691,6 @@
"engines.state.unpacking": "Instalowanie…",
"engines.state.installed": "Zainstalowano",
"engines.state.failed": "Błąd: {0}",
-
"about.title": "O programie",
"about.updates": "Aktualizacje",
"common.search": "Szukaj",
@@ -734,7 +715,6 @@
"feedback.notice_text": "Gwiazdka na GitHubie pomaga innym znaleźć Filee.\nProblemy i pomysły też są mile widziane.",
"feedback.star": "Gwiazdka na GitHubie",
"feedback.issue": "Zgłoś problem lub pomysł",
-
"common.ok": "OK",
"common.cancel": "Anuluj",
"common.save": "Zapisz",
@@ -744,7 +724,6 @@
"common.no": "Nie",
"common.on": "Wł.",
"common.off": "Wył.",
-
"setup.title": "Wybierz silniki konwersji",
"setup.description": "Obrazy, PDF, dokumenty Office, HWP, e-booki, archiwa, czcionki, CAD i modele 3D już się konwertują.\nPobieraj silniki tylko dla wideo i audio lub rzadkich formatów.",
"setup.note": "Silniki możesz w każdej chwili zainstalować lub usunąć w Ustawienia → Silniki.",
@@ -905,7 +884,6 @@
"watch.status_starting": "Uruchamianie…",
"watch.status_error": "Nie można obserwować tego folderu: {0}",
"watch.cli_hint": "Także w wierszu poleceń: filee watch <folder> --to <format>",
-
"whats_new.title": "Nowości w Filee {0}",
"whats_new.previous": "Wstecz",
"whats_new.next": "Dalej",
@@ -924,5 +902,7 @@
"whats_new.2_0_0.languages.title": "Filee mówi w większej liczbie języków",
"whats_new.2_0_0.languages.text": "Do angielskiego, koreańskiego, chińskiego i polskiego dołączają hiszpański, hindi, japoński, rosyjski, arabski i portugalski brazylijski.",
"whats_new.2_0_0.more.title": "I jeszcze trochę",
- "whats_new.2_0_0.more.text": "Przywróć domyślne ustawienia jednego pierścienia, przeszukuj całą historię i konwertuj dokumenty w gudżarati, hindi lub arabskim przez LibreOffice."
+ "whats_new.2_0_0.more.text": "Przywróć domyślne ustawienia jednego pierścienia, przeszukuj całą historię i konwertuj dokumenty w gudżarati, hindi lub arabskim przez LibreOffice.",
+ "theme.style.m3_badge": "Material 3",
+ "theme.style.m3_tag": "M3"
}
diff --git a/src/Filee.App/Assets/i18n/pt-BR.json b/src/Filee.App/Assets/i18n/pt-BR.json
index 243978db..48916c53 100644
--- a/src/Filee.App/Assets/i18n/pt-BR.json
+++ b/src/Filee.App/Assets/i18n/pt-BR.json
@@ -1,7 +1,6 @@
{
"app.name": "Filee",
"app.tagline": "Arraste, solte, convertido.",
-
"nav.home": "Início",
"nav.general": "Geral",
"nav.triggers": "Atalhos",
@@ -11,7 +10,6 @@
"nav.theme": "Tema",
"nav.engines": "Motores",
"nav.about": "Sobre",
-
"tray.open": "Abrir o Filee",
"tray.pause": "Pausar atalhos",
"tray.resume": "Retomar atalhos",
@@ -23,10 +21,8 @@
"close.tray": "Manter na bandeja",
"close.quit": "Sair",
"close.dont_ask": "Não perguntar de novo",
-
"home.title": "Início",
"home.drop_title": "Solte os arquivos aqui",
- "home.drop_select": "Clique duas vezes para selecionar arquivos",
"home.drop_hint": "Ou segure {0} ao arrastar arquivos no Explorador. O menu circular abre no cursor.",
"home.drop_hint_macos": "Ou segure {0} ao arrastar arquivos no Finder. O menu circular abre no cursor.",
"home.drop_hint_linux": "Ou segure {0} ao arrastar arquivos no gerenciador de arquivos. O menu circular abre no cursor.",
@@ -47,7 +43,6 @@
"home.clear_history": "Limpar",
"home.files": "{0} arquivos",
"home.failed_files": "{0} falharam",
-
"donut.center_drag": "Traga os arquivos para cá",
"donut.files_same": "{0} × {1}",
"donut.files_mixed": "{0} arquivos",
@@ -63,7 +58,6 @@
"donut.group_caption": "Grupo de {0}",
"donut.flip_to_back": "{0} ↻ verso",
"donut.flip_to_front": "{0} ↻ frente",
-
"toast.converting": "{0} → {1}",
"toast.done": "Concluído",
"toast.done_errors": "{0} de {1} falharam",
@@ -74,7 +68,6 @@
"toast.cancel": "Cancelar",
"download.badge": "{0}/s · {1}",
"download.badge_files": "{0} · {1} de {2} arquivos",
-
"error.unsupported_source": "Este tipo de arquivo não é compatível",
"error.empty_file": "O arquivo está vazio (0 bytes). Um arquivo criado com “Novo” no menu de contexto continua vazio até você abri-lo no aplicativo e salvá-lo",
"format_request.request": "Pedir este formato",
@@ -114,7 +107,6 @@
"notice.geo_rows_without_location": "Algumas linhas não têm localização utilizável e foram mantidas sem forma",
"notice.geo_field_names": "Nomes de campo de Shapefile têm no máximo 10 caracteres: alguns foram encurtados",
"notice.geo_shapefile_split": "Um Shapefile guarda um tipo de forma, então pontos, linhas e polígonos foram salvos em arquivos separados",
-
"engine.reason.not_installed": "Não instalado",
"engine.reason.error": "Erro ao verificar",
"engine.reason.unsupported_platform": "Indisponível nesta plataforma",
@@ -148,7 +140,6 @@
"engine.ghostscript.description": "EPS, PostScript e arquivos antigos do Illustrator para PDF e imagens; PDF para EPS e PS.",
"engine.calibre.description": "Formatos raros de e-book (LIT, LRF, CHM, PDB, RB…) e saída Kindle (MOBI, AZW3).\nAcima do gravador de HWPX, também gera os PDFs de e-books (bem mais rápido em livros longos).",
"engine.libreoffice.description": "Lê formatos antigos e menos comuns: DOC, PPT, Pages, Keynote, Numbers, WordPerfect, ClarisWorks, Publisher, Visio…\nTambém salva como DOC, XLS, PPT, ODT, ODP, modelos OpenDocument e EMF.",
-
"profile.images": "Imagens",
"profile.pdf": "PDF",
"profile.office": "Documentos",
@@ -168,7 +159,6 @@
"profile.models": "Modelos 3D",
"profile.geo": "Geoespacial",
"profile.mixed": "Arquivos mistos",
-
"preset.crop": "Recortar",
"crop.save": "Recortar e salvar",
"crop.reset": "Redefinir",
@@ -190,7 +180,6 @@
"crop.state_done": "Recortado",
"crop.state_skipped": "Pulado",
"crop.state_failed": "Falhou",
-
"preset.half_size": "Reduzir 50%",
"preset.grayscale": "Tons de cinza",
"preset.remove_background": "Remover fundo",
@@ -223,7 +212,6 @@
"preset.extract_motion": "Extrair vídeo da Live Photo",
"preset.live_photo_iphone": "Live Photo (iPhone)",
"preset.motion_photo_android": "Motion Photo (Android)",
-
"format.folder": "Pasta",
"format.category.Image": "Imagem",
"format.category.Pdf": "PDF",
@@ -243,7 +231,6 @@
"format.category.Data": "Dados",
"format.category.Model3D": "Modelo 3D",
"format.category.Geo": "Geoespacial",
-
"general.title": "Geral",
"general.language": "Idioma",
"general.language_auto": "Padrão do sistema",
@@ -322,7 +309,6 @@
"general.reset_library": "Restaurar padrões",
"general.reset_confirm": "Substituir todas as predefinições e os perfis de menu pelos padrões?",
"general.imported": "{0} itens importados",
-
"triggers.title": "Atalhos",
"triggers.description": "Escolha como o menu circular abre. Você pode adicionar quantos gestos quiser.",
"triggers.macos_permissions": "Permita o Filee em Ajustes do Sistema > Privacidade e Segurança > Acessibilidade.\nO Finder também pede permissão de Automação na primeira vez que você usa um atalho de seleção.",
@@ -375,7 +361,6 @@
"triggers.excluded_none_running": "Nenhum outro app tem uma janela aberta.",
"triggers.excluded_note": "Gestos e atalhos não fazem nada enquanto o ponteiro está sobre estes apps.",
"triggers.paused": "Os atalhos estão pausados",
-
"toolbar.title": "Menu circular",
"toolbar.step_profile": "1. Escolha um perfil",
"toolbar.step_arrange": "2. Organize as predefinições",
@@ -437,7 +422,6 @@
"toolbar.mixed_others": "Outras misturas de arquivos abrem “{0}”.",
"toolbar.mixed_others_self": "Não restou perfil misto sem nada marcado, então este também é usado para toda outra mistura.",
"tags.remove": "Remover",
-
"presets.title": "Predefinições",
"presets.add": "Nova",
"presets.duplicate": "Duplicar",
@@ -610,7 +594,6 @@
"presets.delete_confirm": "Excluir “{0}”? Também será removida de todo menu e grupo.",
"presets.name_required": "Digite um nome",
"presets.select": "Selecione uma predefinição para editá-la",
-
"theme.title": "Tema",
"theme.style": "Estilo do tema",
"theme.style.Soft": "Filee Soft",
@@ -638,7 +621,6 @@
"theme.reduce_motion": "Reduzir animações",
"theme.reduce_motion_hint": "Recomendado para PCs mais antigos. Desliga as transições e o salto do menu.",
"theme.preview": "Prévia",
-
"engines.title": "Motores de conversão",
"engines.description": "O Filee escolhe o melhor motor disponível para cada conversão.\nQuando vários fazem o mesmo trabalho, o que está mais acima tem prioridade.",
"engines.available": "Pronto",
@@ -709,7 +691,6 @@
"engines.state.unpacking": "Instalando…",
"engines.state.installed": "Instalado",
"engines.state.failed": "Falhou: {0}",
-
"about.title": "Sobre",
"about.updates": "Atualizações",
"common.search": "Pesquisar",
@@ -734,7 +715,6 @@
"feedback.notice_text": "Uma estrela no GitHub ajuda outras pessoas a encontrar o Filee.\nProblemas e ideias também são bem-vindos.",
"feedback.star": "Dar estrela no GitHub",
"feedback.issue": "Relatar um problema ou uma ideia",
-
"common.ok": "OK",
"common.cancel": "Cancelar",
"common.save": "Salvar",
@@ -744,7 +724,6 @@
"common.no": "Não",
"common.on": "Ligado",
"common.off": "Desligado",
-
"setup.title": "Escolha os motores de conversão",
"setup.description": "Imagens, PDF, documentos do Office, HWP, e-books, arquivos compactados, fontes, CAD e modelos 3D já convertem.\nBaixe motores só para vídeo e áudio ou formatos raros.",
"setup.note": "Você pode instalar ou remover motores a qualquer momento em Configurações → Motores.",
@@ -905,7 +884,6 @@
"watch.status_starting": "Iniciando…",
"watch.status_error": "Não é possível monitorar esta pasta: {0}",
"watch.cli_hint": "Também na linha de comando: filee watch <pasta> --to <formato>",
-
"whats_new.title": "Novidades do Filee {0}",
"whats_new.previous": "Anterior",
"whats_new.next": "Próximo",
@@ -924,5 +902,7 @@
"whats_new.2_0_0.languages.title": "O Filee fala mais idiomas",
"whats_new.2_0_0.languages.text": "Espanhol, hindi, japonês, russo, árabe e português do Brasil se juntam ao inglês, coreano, chinês e polonês.",
"whats_new.2_0_0.more.title": "E um pouco mais",
- "whats_new.2_0_0.more.text": "Restaure um único menu aos padrões, pesquise todo o histórico e converta documentos em guzerate, hindi ou árabe pelo LibreOffice."
+ "whats_new.2_0_0.more.text": "Restaure um único menu aos padrões, pesquise todo o histórico e converta documentos em guzerate, hindi ou árabe pelo LibreOffice.",
+ "theme.style.m3_badge": "Material 3",
+ "theme.style.m3_tag": "M3"
}
diff --git a/src/Filee.App/Assets/i18n/ru.json b/src/Filee.App/Assets/i18n/ru.json
index a75ec9e8..edf473a3 100644
--- a/src/Filee.App/Assets/i18n/ru.json
+++ b/src/Filee.App/Assets/i18n/ru.json
@@ -1,7 +1,6 @@
{
"app.name": "Filee",
"app.tagline": "Перетащил — и готово.",
-
"nav.home": "Главная",
"nav.general": "Общие",
"nav.triggers": "Горячие клавиши",
@@ -11,7 +10,6 @@
"nav.theme": "Тема",
"nav.engines": "Движки",
"nav.about": "О программе",
-
"tray.open": "Открыть Filee",
"tray.pause": "Приостановить горячие клавиши",
"tray.resume": "Возобновить горячие клавиши",
@@ -23,10 +21,8 @@
"close.tray": "Оставить в трее",
"close.quit": "Выйти",
"close.dont_ask": "Больше не спрашивать",
-
"home.title": "Главная",
"home.drop_title": "Перетащите файлы сюда",
- "home.drop_select": "Дважды щелкните, чтобы выбрать файлы",
"home.drop_hint": "Или зажмите {0}, перетаскивая файлы в Проводнике. Круговое меню откроется у курсора.",
"home.drop_hint_macos": "Или зажмите {0}, перетаскивая файлы в Finder. Круговое меню откроется у курсора.",
"home.drop_hint_linux": "Или зажмите {0}, перетаскивая файлы в файловом менеджере. Круговое меню откроется у курсора.",
@@ -47,7 +43,6 @@
"home.clear_history": "Очистить",
"home.files": "Файлов: {0}",
"home.failed_files": "Ошибок: {0}",
-
"donut.center_drag": "Перетащите сюда",
"donut.files_same": "{0} × {1}",
"donut.files_mixed": "Файлов: {0}",
@@ -63,7 +58,6 @@
"donut.group_caption": "Группа: {0}",
"donut.flip_to_back": "{0} ↻ оборот",
"donut.flip_to_front": "{0} ↻ лицо",
-
"toast.converting": "{0} → {1}",
"toast.done": "Готово",
"toast.done_errors": "Не удалось: {0} из {1}",
@@ -74,7 +68,6 @@
"toast.cancel": "Отмена",
"download.badge": "{0}/с · {1}",
"download.badge_files": "{0} · файл {1} из {2}",
-
"error.unsupported_source": "Этот тип файлов не поддерживается",
"error.empty_file": "Файл пустой (0 байт). Файл, созданный через «Создать» в контекстном меню, остаётся пустым, пока его не откроют в программе и не сохранят",
"format_request.request": "Запросить этот формат",
@@ -114,7 +107,6 @@
"notice.geo_rows_without_location": "В некоторых строках нет пригодного местоположения: они сохранены без фигуры",
"notice.geo_field_names": "Имена полей Shapefile не длиннее 10 символов: некоторые сокращены",
"notice.geo_shapefile_split": "Shapefile хранит фигуры только одного вида, поэтому точки, линии и полигоны сохранены в отдельные файлы",
-
"engine.reason.not_installed": "Не установлен",
"engine.reason.error": "Ошибка при проверке",
"engine.reason.unsupported_platform": "Недоступен на этой платформе",
@@ -148,7 +140,6 @@
"engine.ghostscript.description": "EPS, PostScript и старые файлы Illustrator — в PDF и картинки; PDF — в EPS и PS.",
"engine.calibre.description": "Редкие форматы электронных книг (LIT, LRF, CHM, PDB, RB…) и вывод для Kindle (MOBI, AZW3).\nЕсли стоит выше HWPX writer, он же делает PDF из электронных книг (для длинных книг намного быстрее).",
"engine.libreoffice.description": "Читает старые и редкие форматы: DOC, PPT, Pages, Keynote, Numbers, WordPerfect, ClarisWorks, Publisher, Visio…\nА ещё сохраняет в DOC, XLS, PPT, ODT, ODP, шаблоны OpenDocument и EMF.",
-
"profile.images": "Изображения",
"profile.pdf": "PDF",
"profile.office": "Документы",
@@ -168,7 +159,6 @@
"profile.models": "3D-модели",
"profile.geo": "Геоданные",
"profile.mixed": "Разные файлы",
-
"preset.crop": "Обрезать",
"crop.save": "Обрезать и сохранить",
"crop.reset": "Сбросить",
@@ -190,7 +180,6 @@
"crop.state_done": "Обрезан",
"crop.state_skipped": "Пропущен",
"crop.state_failed": "Ошибка",
-
"preset.half_size": "Вдвое меньше",
"preset.grayscale": "Оттенки серого",
"preset.remove_background": "Убрать фон",
@@ -223,7 +212,6 @@
"preset.extract_motion": "Видео из Live Photo",
"preset.live_photo_iphone": "Live Photo (iPhone)",
"preset.motion_photo_android": "Motion Photo (Android)",
-
"format.folder": "Папка",
"format.category.Image": "Изображение",
"format.category.Pdf": "PDF",
@@ -243,7 +231,6 @@
"format.category.Data": "Данные",
"format.category.Model3D": "3D-модель",
"format.category.Geo": "Геоданные",
-
"general.title": "Общие",
"general.language": "Язык",
"general.language_auto": "Как в системе",
@@ -322,7 +309,6 @@
"general.reset_library": "Вернуть по умолчанию",
"general.reset_confirm": "Заменить все пресеты и профили кругового меню на стандартные?",
"general.imported": "Импортировано: {0}",
-
"triggers.title": "Горячие клавиши",
"triggers.description": "Выберите, как открывается круговое меню. Жестов можно добавить сколько угодно.",
"triggers.macos_permissions": "Разрешите Filee в разделе «Системные настройки > Конфиденциальность и безопасность > Универсальный доступ».\nFinder также спросит разрешение на автоматизацию, когда вы впервые воспользуетесь сочетанием для выделенных файлов.",
@@ -375,7 +361,6 @@
"triggers.excluded_none_running": "Нет других программ с открытыми окнами.",
"triggers.excluded_note": "Жесты и сочетания ничего не делают, пока указатель над этими программами.",
"triggers.paused": "Горячие клавиши приостановлены",
-
"toolbar.title": "Круговое меню",
"toolbar.step_profile": "1. Выберите профиль",
"toolbar.step_arrange": "2. Расставьте пресеты",
@@ -437,7 +422,6 @@
"toolbar.mixed_others": "Остальные смеси файлов открывают «{0}».",
"toolbar.mixed_others_self": "Не осталось смешанного профиля без отметок, поэтому этот используется и для всех остальных смесей.",
"tags.remove": "Убрать",
-
"presets.title": "Пресеты",
"presets.add": "Новый",
"presets.duplicate": "Дублировать",
@@ -610,7 +594,6 @@
"presets.delete_confirm": "Удалить «{0}»? Он также пропадёт из всех круговых меню и групп.",
"presets.name_required": "Введите название",
"presets.select": "Выберите пресет, чтобы изменить его",
-
"theme.title": "Тема",
"theme.style": "Стиль темы",
"theme.style.Soft": "Filee Soft",
@@ -638,7 +621,6 @@
"theme.reduce_motion": "Меньше анимации",
"theme.reduce_motion_hint": "Рекомендуется для старых компьютеров. Отключает переходы и подпрыгивание кругового меню.",
"theme.preview": "Предпросмотр",
-
"engines.title": "Движки конвертации",
"engines.description": "Для каждой конвертации Filee выбирает лучший доступный движок.\nЕсли с задачей справляются несколько, выбирается тот, что выше.",
"engines.available": "Готовы",
@@ -709,7 +691,6 @@
"engines.state.unpacking": "Устанавливается…",
"engines.state.installed": "Установлен",
"engines.state.failed": "Ошибка: {0}",
-
"about.title": "О программе",
"about.updates": "Обновления",
"common.search": "Поиск",
@@ -734,7 +715,6 @@
"feedback.notice_text": "Звезда на GitHub помогает другим найти Filee.\nБудем рады и сообщениям о проблемах, и идеям.",
"feedback.star": "Поставить звезду на GitHub",
"feedback.issue": "Сообщить о проблеме или идее",
-
"common.ok": "OK",
"common.cancel": "Отмена",
"common.save": "Сохранить",
@@ -744,7 +724,6 @@
"common.no": "Нет",
"common.on": "Вкл.",
"common.off": "Выкл.",
-
"setup.title": "Выберите движки конвертации",
"setup.description": "Картинки, PDF, документы Office, HWP, электронные книги, архивы, шрифты, CAD и 3D-модели уже конвертируются.\nДвижки нужно скачивать только для видео, аудио и редких форматов.",
"setup.note": "Движки можно установить или удалить в любой момент в разделе «Настройки → Движки».",
@@ -905,7 +884,6 @@
"watch.status_starting": "Запуск…",
"watch.status_error": "Не удаётся следить за этой папкой: {0}",
"watch.cli_hint": "Также из командной строки: filee watch <папка> --to <формат>",
-
"whats_new.title": "Что нового в Filee {0}",
"whats_new.previous": "Назад",
"whats_new.next": "Далее",
@@ -924,5 +902,7 @@
"whats_new.2_0_0.languages.title": "Filee говорит на большем числе языков",
"whats_new.2_0_0.languages.text": "К английскому, корейскому, китайскому и польскому добавились испанский, хинди, японский, русский, арабский и бразильский португальский.",
"whats_new.2_0_0.more.title": "И ещё немного",
- "whats_new.2_0_0.more.text": "Сбрасывайте одно круговое меню к настройкам по умолчанию, ищите по всей истории и конвертируйте документы на гуджарати, хинди и арабском через LibreOffice."
+ "whats_new.2_0_0.more.text": "Сбрасывайте одно круговое меню к настройкам по умолчанию, ищите по всей истории и конвертируйте документы на гуджарати, хинди и арабском через LibreOffice.",
+ "theme.style.m3_badge": "Material 3",
+ "theme.style.m3_tag": "M3"
}
diff --git a/src/Filee.App/Assets/i18n/zh-CN.json b/src/Filee.App/Assets/i18n/zh-CN.json
index e961f994..ed3ff9d4 100644
--- a/src/Filee.App/Assets/i18n/zh-CN.json
+++ b/src/Filee.App/Assets/i18n/zh-CN.json
@@ -1,7 +1,6 @@
{
"app.name": "Filee",
"app.tagline": "拖一拖,放一放,转换完成。",
-
"nav.home": "首页",
"nav.general": "常规",
"nav.triggers": "快捷操作",
@@ -11,7 +10,6 @@
"nav.theme": "主题",
"nav.engines": "转换引擎",
"nav.about": "关于",
-
"tray.open": "打开 Filee",
"tray.pause": "暂停快捷操作",
"tray.resume": "恢复快捷操作",
@@ -23,10 +21,8 @@
"close.tray": "保留在托盘",
"close.quit": "退出",
"close.dont_ask": "不再询问",
-
"home.title": "首页",
"home.drop_title": "将文件拖放到这里",
- "home.drop_select": "双击选择文件",
"home.drop_hint": "或在资源管理器中按住 {0} 拖动文件,环形工具栏会在光标处打开。",
"home.drop_hint_macos": "或在访达中按住 {0} 拖动文件,环形工具栏会在光标处打开。",
"home.drop_hint_linux": "或在文件管理器中按住 {0} 拖动文件,环形工具栏会在光标处打开。",
@@ -47,7 +43,6 @@
"home.clear_history": "清除",
"home.files": "{0} 个文件",
"home.failed_files": "{0} 个失败",
-
"donut.center_drag": "把文件拖到这里",
"donut.files_same": "{0} 个 {1}",
"donut.files_mixed": "{0} 个文件",
@@ -63,7 +58,6 @@
"donut.group_caption": "组 · {0} 项",
"donut.flip_to_back": "{0} ↻ 背面",
"donut.flip_to_front": "{0} ↻ 正面",
-
"toast.converting": "{0} → {1}",
"toast.done": "完成",
"toast.done_errors": "{1} 个中有 {0} 个失败",
@@ -74,7 +68,6 @@
"toast.cancel": "取消",
"download.badge": "{0}/s · {1}",
"download.badge_files": "{0} · 第 {1}/{2} 个文件",
-
"error.unsupported_source": "不支持此文件类型",
"error.empty_file": "文件是空的(0 字节)。用右键菜单“新建”创建的文件,要在对应的应用中打开并保存后才有内容",
"format_request.request": "请求支持此格式",
@@ -114,7 +107,6 @@
"notice.geo_rows_without_location": "部分行无法读出位置,已不带形状保存",
"notice.geo_field_names": "Shapefile 字段名最多 10 个字符,部分名称已缩短",
"notice.geo_shapefile_split": "Shapefile 只能保存一种形状,因此点、线、面被分别存成了多个文件",
-
"engine.reason.not_installed": "未安装",
"engine.reason.error": "检查时出错",
"engine.reason.unsupported_platform": "此平台不可用",
@@ -148,7 +140,6 @@
"engine.ghostscript.description": "EPS、PostScript 和旧版 Illustrator 文件转为 PDF 和图片;PDF 转为 EPS 和 PS。",
"engine.calibre.description": "少见的电子书格式(LIT、LRF、CHM、PDB、RB…)以及 Kindle 输出(MOBI、AZW3)。\n排在 HWPX writer 之上时,也由它把电子书转为 PDF(长书快得多)。",
"engine.libreoffice.description": "读取较旧或少见的格式,如 DOC、PPT、Pages、Keynote、Numbers、WordPerfect、ClarisWorks、Publisher、Visio。\n也能保存为 DOC、XLS、PPT、ODT、ODP、OpenDocument 模板或 EMF。",
-
"profile.images": "图片",
"profile.pdf": "PDF",
"profile.office": "文档",
@@ -168,7 +159,6 @@
"profile.models": "3D 模型",
"profile.geo": "地理信息 (GIS)",
"profile.mixed": "混合文件",
-
"preset.crop": "裁剪",
"crop.save": "裁剪并保存",
"crop.reset": "重置",
@@ -190,7 +180,6 @@
"crop.state_done": "已裁剪",
"crop.state_skipped": "已跳过",
"crop.state_failed": "失败",
-
"preset.half_size": "缩小 50%",
"preset.grayscale": "灰度",
"preset.remove_background": "去除背景",
@@ -223,7 +212,6 @@
"preset.extract_motion": "提取实况/动态照片视频",
"preset.live_photo_iphone": "实况照片(iPhone)",
"preset.motion_photo_android": "动态照片(安卓)",
-
"format.folder": "文件夹",
"format.category.Image": "图片",
"format.category.Pdf": "PDF",
@@ -243,7 +231,6 @@
"format.category.Data": "数据",
"format.category.Model3D": "3D 模型",
"format.category.Geo": "地理信息",
-
"general.title": "常规",
"general.language": "语言",
"general.language_auto": "跟随系统",
@@ -322,7 +309,6 @@
"general.reset_library": "恢复默认",
"general.reset_confirm": "要将所有预设和工具栏配置恢复为默认吗?",
"general.imported": "已导入 {0} 项",
-
"triggers.title": "快捷操作",
"triggers.description": "选择打开环形工具栏的方式。可以添加任意多个手势。",
"triggers.macos_permissions": "请在系统设置 > 隐私与安全性 > 辅助功能中允许 Filee。\n首次使用选择文件的快捷键时,Finder 还会请求自动化权限。",
@@ -375,7 +361,6 @@
"triggers.excluded_none_running": "没有其他打开窗口的应用。",
"triggers.excluded_note": "指针位于这些应用上时,手势和快捷键不起作用。",
"triggers.paused": "快捷操作已暂停",
-
"toolbar.title": "环形工具栏",
"toolbar.step_profile": "1. 选择配置",
"toolbar.step_arrange": "2. 排列预设",
@@ -437,7 +422,6 @@
"toolbar.mixed_others": "其他混合选择会打开“{0}”。",
"toolbar.mixed_others_self": "没有未勾选任何项的混合配置,因此其他混合选择也会使用此配置。",
"tags.remove": "移除",
-
"presets.title": "预设",
"presets.add": "新建",
"presets.duplicate": "复制",
@@ -610,7 +594,6 @@
"presets.delete_confirm": "删除“{0}”?它也会从所有工具栏和组中移除。",
"presets.name_required": "请输入名称",
"presets.select": "选择要编辑的预设",
-
"theme.title": "主题",
"theme.style": "主题样式",
"theme.style.Soft": "Filee Soft",
@@ -638,7 +621,6 @@
"theme.reduce_motion": "减少动画",
"theme.reduce_motion_hint": "适合配置较低的电脑。关闭过渡效果和圆环的弹跳效果。",
"theme.preview": "预览",
-
"engines.title": "转换引擎",
"engines.description": "Filee 会为每次转换选择最合适的可用引擎。\n多个引擎能完成同一转换时,列表中靠前的优先。",
"engines.available": "可用",
@@ -709,7 +691,6 @@
"engines.state.unpacking": "安装中…",
"engines.state.installed": "已安装",
"engines.state.failed": "失败:{0}",
-
"about.title": "关于",
"about.updates": "更新",
"common.search": "搜索",
@@ -734,7 +715,6 @@
"feedback.notice_text": "在 GitHub 上点个星(⭐)能帮助更多人发现 Filee。\n也欢迎反馈问题或提出想法。",
"feedback.star": "在 GitHub 上点星",
"feedback.issue": "报告问题 · 提出建议",
-
"common.ok": "确定",
"common.cancel": "取消",
"common.save": "保存",
@@ -744,7 +724,6 @@
"common.no": "否",
"common.on": "开",
"common.off": "关",
-
"setup.title": "选择转换引擎",
"setup.description": "图片、PDF、Office 文档、HWP、电子书、压缩文件、字体、CAD 和 3D 模型现在就能转换。\n只有视频、音频或少见格式才需要下载引擎。",
"setup.note": "可随时在“设置 → 转换引擎”中安装或删除引擎。",
@@ -905,7 +884,6 @@
"watch.status_starting": "正在启动…",
"watch.status_error": "无法监视此文件夹:{0}",
"watch.cli_hint": "也可以在命令行中使用:filee watch <文件夹> --to <格式>",
-
"whats_new.title": "Filee {0} 新功能",
"whats_new.previous": "上一页",
"whats_new.next": "下一页",
@@ -924,5 +902,7 @@
"whats_new.2_0_0.languages.title": "支持更多语言",
"whats_new.2_0_0.languages.text": "在英语、韩语、中文和波兰语之外,新增西班牙语、印地语、日语、俄语、阿拉伯语和巴西葡萄牙语。",
"whats_new.2_0_0.more.title": "还有更多",
- "whats_new.2_0_0.more.text": "可以只把一个环形工具栏恢复默认、搜索全部历史记录,并通过 LibreOffice 转换古吉拉特语、印地语或阿拉伯语文档。"
+ "whats_new.2_0_0.more.text": "可以只把一个环形工具栏恢复默认、搜索全部历史记录,并通过 LibreOffice 转换古吉拉特语、印地语或阿拉伯语文档。",
+ "theme.style.m3_badge": "Material 3",
+ "theme.style.m3_tag": "M3"
}
diff --git a/src/Filee.App/Services/HistoryThumbnails.cs b/src/Filee.App/Services/HistoryThumbnails.cs
index 03a60c33..6f1c36e5 100644
--- a/src/Filee.App/Services/HistoryThumbnails.cs
+++ b/src/Filee.App/Services/HistoryThumbnails.cs
@@ -1,26 +1,14 @@
-// Small square pictures of converted files for the Home page's recent conversions. Skia decodes images off the UI
+// Small square pictures of converted files for the Home page's recent conversions. Skia decodes them off the UI
// thread, at a fraction of the picture's size where the format allows it (JPEG, WebP), from a copy of the file read in
-// one go, so the file is held open only while it is read and others may still write, rename or delete it meanwhile.
-// Video formats (MP4, MKV, WebM, etc.) have a representative frame extracted via FFmpeg off the UI thread without
-// locking the file. Documents (PDF, DOCX) and text/data files render document previews or extracted thumbnails.
-// A small cache keeps them while the files don't change: a search lists the same conversions again at once.
+// one go, so the file is held open only while it is read and others may still write, rename or delete it meanwhile. A
+// small cache keeps them while the files don't change: a search lists the same conversions again at once.
-using System.Diagnostics;
-using System.Globalization;
-using System.IO.Compression;
-using System.Text;
-using System.Xml;
using Avalonia;
using Avalonia.Media.Imaging;
using Avalonia.Platform;
-using Filee.Core.Formats;
using Filee.Core.Platform;
-using Filee.Engines.Media;
using SkiaSharp;
-// PDFtoImage marks its API for desktop platforms that are all covered.
-#pragma warning disable CA1416
-
namespace Filee.App.Services;
internal static class HistoryThumbnails
@@ -28,7 +16,7 @@ internal static class HistoryThumbnails
/// <summary>Width and height in pixels: the card shows it at 42, so this is sharp up to 200 % scaling.</summary>
public const int Size = 96;
- /// <summary>Larger image files are not read: the card shows their format instead.</summary>
+ /// <summary>Larger files are not read: the card shows their format instead.</summary>
internal const long MaxFileBytes = 64L * 1024 * 1024;
/// <summary>
@@ -39,49 +27,19 @@ internal static class HistoryThumbnails
private const int CacheSize = 120;
- /// <summary>Pictures Skia decodes natively on every platform.</summary>
- private static readonly HashSet<string> ImageExtensions = new(StringComparer.OrdinalIgnoreCase)
+ /// <summary>Pictures Skia reads on every platform.</summary>
+ private static readonly HashSet<string> Readable = new(StringComparer.OrdinalIgnoreCase)
{
"png", "jpg", "jpeg", "jfif", "webp", "gif", "bmp", "ico",
};
- /// <summary>PDF documents rendered via PDFium / PDFtoImage.</summary>
- private static readonly HashSet<string> PdfExtensions = new(StringComparer.OrdinalIgnoreCase)
- {
- "pdf",
- };
-
- /// <summary>Word documents inspected for embedded thumbnails or text previews.</summary>
- private static readonly HashSet<string> DocxExtensions = new(StringComparer.OrdinalIgnoreCase)
- {
- "docx", "docm", "dotx", "dotm",
- };
-
- /// <summary>Text, code, markdown, and structured data formats rendered as clean document preview cards.</summary>
- private static readonly HashSet<string> TextExtensions = new(StringComparer.OrdinalIgnoreCase)
- {
- "txt", "md", "markdown", "json", "xml", "csv", "tsv", "yaml", "yml", "ini", "toml", "log",
- "cs", "js", "ts", "html", "htm", "css", "sql", "sh", "bat", "ps1", "py", "rs", "go", "cpp", "c", "h", "rtf",
- };
-
private sealed record Entry(DateTime Written, long Length, Bitmap? Bitmap);
private static readonly Dictionary<string, Entry> Cache = new(FileSystemPaths.Comparer);
private static readonly Lock CacheLock = new();
- /// <summary>Whether <paramref name="path"/> is a file a thumbnail can be made of (by its extension only).</summary>
- public static bool CanShow(string path)
- {
- var ext = Path.GetExtension(path).TrimStart('.');
- return ImageExtensions.Contains(ext)
- || PdfExtensions.Contains(ext)
- || DocxExtensions.Contains(ext)
- || TextExtensions.Contains(ext)
- || IsVideo(ext);
- }
-
- internal static bool IsVideo(string ext) =>
- FormatRegistry.FindByExtension(ext)?.Category == FormatCategory.Video;
+ /// <summary>Whether <paramref name="path"/> is a picture a thumbnail can be made of (by its extension only).</summary>
+ public static bool CanShow(string path) => Readable.Contains(Path.GetExtension(path).TrimStart('.'));
/// <summary>The thumbnail made last time for <paramref name="path"/>, without looking at the file.</summary>
public static Bitmap? Cached(string path)
@@ -92,7 +50,7 @@ internal static class HistoryThumbnails
/// <summary>
/// The thumbnail of <paramref name="path"/>, from the cache while the file is unchanged. Null when the file is gone,
- /// too large or not a picture/video/document Filee reads. Reads the disk: never call it on the UI thread.
+ /// too large or not a picture Skia reads. Reads the disk: never call it on the UI thread.
/// </summary>
public static Bitmap? Load(string path)
{
@@ -116,35 +74,8 @@ internal static class HistoryThumbnails
return hit.Bitmap;
}
- var ext = Path.GetExtension(path).TrimStart('.');
- Bitmap? bitmap = null;
-
- if (IsVideo(ext))
- {
- if (length > 0)
- bitmap = DecodeVideo(path, MaxDecodedPixels);
- }
- else if (PdfExtensions.Contains(ext))
- {
- if (length > 0 && length <= MaxFileBytes)
- bitmap = DecodePdf(path, MaxDecodedPixels);
- }
- else if (DocxExtensions.Contains(ext))
- {
- if (length > 0 && length <= MaxFileBytes)
- bitmap = DecodeDocx(path);
- }
- else if (TextExtensions.Contains(ext))
- {
- if (length > 0 && length <= MaxFileBytes)
- bitmap = RenderTextThumbnail(path, ext);
- }
- else if (ImageExtensions.Contains(ext))
- {
- if (length <= MaxFileBytes)
- bitmap = Decode(path, MaxDecodedPixels);
- }
-
+ // A file that can't be read is remembered too, so a search doesn't try it again on every key.
+ var bitmap = length <= MaxFileBytes ? Decode(path, MaxDecodedPixels) : null;
lock (CacheLock)
{
if (Cache.Count >= CacheSize)
@@ -154,340 +85,6 @@ internal static class HistoryThumbnails
return bitmap;
}
- /// <summary>
- /// Renders page 0 of PDF document <paramref name="path"/> using PDFium and crops it into a square from the top.
- /// </summary>
- internal static Bitmap? DecodePdf(string path, long maxPixels)
- {
- try
- {
- var fileInfo = new FileInfo(path);
- if (!fileInfo.Exists || fileInfo.Length < 8)
- return null;
-
- byte[] bytes;
- using (var stream = new FileStream(path, FileMode.Open, FileAccess.Read, FileShare.ReadWrite | FileShare.Delete,
- 64 * 1024, FileOptions.SequentialScan))
- {
- using var ms = new MemoryStream();
- stream.CopyTo(ms);
- bytes = ms.ToArray();
- }
-
- if (bytes.Length < 8)
- return null;
-
- // Verify PDF header magic bytes "%PDF"
- if (bytes[0] != 0x25 || bytes[1] != 0x50 || bytes[2] != 0x44 || bytes[3] != 0x46)
- return null;
-
- using var pageBitmap = PDFtoImage.Conversion.ToImage(bytes, page: 0, password: null, options: new PDFtoImage.RenderOptions(Dpi: 72));
- if (pageBitmap is null || pageBitmap.Width <= 0 || pageBitmap.Height <= 0)
- return null;
-
- if ((long)pageBitmap.Width * pageBitmap.Height > maxPixels)
- return null;
-
- return Square(pageBitmap, SKEncodedOrigin.TopLeft, fromTop: true);
- }
- catch (Exception)
- {
- return null;
- }
- }
-
- /// <summary>
- /// Inspects DOCX archive <paramref name="path"/> for embedded thumbnail or extracts text snippets to render a preview card.
- /// </summary>
- internal static Bitmap? DecodeDocx(string path)
- {
- try
- {
- using var stream = new FileStream(path, FileMode.Open, FileAccess.Read, FileShare.ReadWrite | FileShare.Delete,
- 64 * 1024, FileOptions.SequentialScan);
- using var archive = new ZipArchive(stream, ZipArchiveMode.Read);
-
- // 1. Check for embedded thumbnail (docProps/thumbnail.jpeg or .png)
- var thumbEntry = archive.GetEntry("docProps/thumbnail.jpeg")
- ?? archive.GetEntry("docProps/thumbnail.jpg")
- ?? archive.GetEntry("docProps/thumbnail.png");
-
- if (thumbEntry is not null)
- {
- using var entryStream = thumbEntry.Open();
- using var ms = new MemoryStream();
- entryStream.CopyTo(ms);
- var thumbData = ms.ToArray();
- using var data = SKData.CreateCopy(thumbData);
- using var codec = SKCodec.Create(data);
- if (codec is not null && codec.Info.Width > 0 && codec.Info.Height > 0)
- {
- var info = new SKImageInfo(codec.Info.Width, codec.Info.Height, SKColorType.Bgra8888, SKAlphaType.Premul);
- using var decoded = new SKBitmap(info);
- if (codec.GetPixels(info, decoded.GetPixels()) is SKCodecResult.Success or SKCodecResult.IncompleteInput)
- {
- return Square(decoded, codec.EncodedOrigin, fromTop: true);
- }
- }
- }
-
- // 2. Fall back to extracting text snippets from word/document.xml
- var docEntry = archive.GetEntry("word/document.xml");
- if (docEntry is not null)
- {
- using var entryStream = docEntry.Open();
- var text = ExtractTextFromXml(entryStream, maxChars: 300);
- if (!string.IsNullOrWhiteSpace(text))
- {
- return RenderDocumentCard(text, "DOCX", new SKColor(0x2B, 0x57, 0x9A));
- }
- }
- }
- catch (Exception)
- {
- // Corrupt or unreadable archive
- }
- return null;
- }
-
- private static string ExtractTextFromXml(Stream xmlStream, int maxChars)
- {
- var sb = new StringBuilder();
- using var reader = XmlReader.Create(xmlStream, new XmlReaderSettings
- {
- IgnoreComments = true,
- IgnoreWhitespace = true,
- DtdProcessing = DtdProcessing.Ignore,
- });
-
- while (reader.Read())
- {
- if (reader.NodeType == XmlNodeType.Element && reader.LocalName == "t")
- {
- var text = reader.ReadElementContentAsString();
- if (!string.IsNullOrWhiteSpace(text))
- {
- if (sb.Length > 0)
- sb.Append(' ');
- sb.Append(text.Trim());
- if (sb.Length >= maxChars)
- break;
- }
- }
- }
- return sb.ToString();
- }
-
- /// <summary>
- /// Reads the first few hundred characters of a text file and draws a clean document preview card.
- /// </summary>
- internal static Bitmap? RenderTextThumbnail(string path, string ext)
- {
- try
- {
- string content;
- using (var stream = new FileStream(path, FileMode.Open, FileAccess.Read, FileShare.ReadWrite | FileShare.Delete,
- 8192, FileOptions.SequentialScan))
- using (var reader = new StreamReader(stream, Encoding.UTF8, detectEncodingFromByteOrderMarks: true, bufferSize: 2048, leaveOpen: false))
- {
- var chars = new char[500];
- var read = reader.Read(chars, 0, chars.Length);
- if (read <= 0)
- return null;
- content = new string(chars, 0, read);
- }
-
- var badgeText = ext.ToUpperInvariant();
- if (badgeText.Length > 4)
- badgeText = badgeText[..4];
-
- var badgeColor = ext.ToLowerInvariant() switch
- {
- "json" or "js" or "ts" or "cs" or "py" or "rs" or "go" or "cpp" or "c" or "h" => new SKColor(0xD9, 0x77, 0x06),
- "md" or "markdown" => new SKColor(0x02, 0x84, 0xC7),
- "csv" or "tsv" => new SKColor(0x05, 0x96, 0x69),
- "xml" or "html" or "htm" => new SKColor(0xEA, 0x58, 0x0C),
- _ => new SKColor(0x4B, 0x55, 0x63),
- };
-
- return RenderDocumentCard(content, badgeText, badgeColor);
- }
- catch (Exception)
- {
- return null;
- }
- }
-
- /// <summary>
- /// Draws a paper sheet preview card with a category badge and lines of formatted text.
- /// </summary>
- internal static Bitmap RenderDocumentCard(string text, string badgeText, SKColor badgeColor)
- {
- using var square = new SKBitmap(new SKImageInfo(Size, Size, SKColorType.Bgra8888, SKAlphaType.Premul));
- using (var canvas = new SKCanvas(square))
- {
- canvas.Clear(SKColors.Transparent);
-
- // Document sheet: soft neutral paper with subtle rounded corners and thin border
- var paperRect = new SKRoundRect(new SKRect(5, 5, Size - 5, Size - 5), 6, 6);
- using (var paperPaint = new SKPaint { Color = new SKColor(0xFA, 0xFA, 0xFC), IsAntialias = true, Style = SKPaintStyle.Fill })
- {
- canvas.DrawRoundRect(paperRect, paperPaint);
- }
- using (var borderPaint = new SKPaint { Color = new SKColor(0x00, 0x00, 0x00, 0x22), IsAntialias = true, Style = SKPaintStyle.Stroke, StrokeWidth = 1f })
- {
- canvas.DrawRoundRect(paperRect, borderPaint);
- }
-
- // Format badge pill
- var badgeWidth = Math.Clamp(badgeText.Length * 7f + 10f, 28f, 54f);
- var badgeRect = new SKRoundRect(new SKRect(11, 10, 11 + badgeWidth, 23), 3, 3);
- using (var badgeBg = new SKPaint { Color = badgeColor, IsAntialias = true, Style = SKPaintStyle.Fill })
- {
- canvas.DrawRoundRect(badgeRect, badgeBg);
- }
-
- using (var badgeFont = new SKFont(SKTypeface.Default, 8f))
- using (var badgeTextPaint = new SKPaint { Color = SKColors.White, IsAntialias = true })
- {
- canvas.DrawText(badgeText, 15, 19.5f, badgeFont, badgeTextPaint);
- }
-
- // Preview text lines
- var rawLines = text.Replace("\r", "").Split('\n', StringSplitOptions.RemoveEmptyEntries);
- using (var textFont = new SKFont(SKTypeface.Default, 6.5f))
- using (var textPaint = new SKPaint { Color = new SKColor(0x37, 0x41, 0x51), IsAntialias = true })
- {
- var y = 33f;
- var lineCount = 0;
- foreach (var rawLine in rawLines)
- {
- var line = rawLine.Trim();
- if (string.IsNullOrEmpty(line))
- continue;
-
- while (line.Length > 0 && lineCount < 6)
- {
- var chunkLen = Math.Min(line.Length, 20);
- var chunk = line[..chunkLen];
- canvas.DrawText(chunk, 12, y, textFont, textPaint);
- y += 9f;
- lineCount++;
- line = line[chunkLen..].TrimStart();
- }
- if (lineCount >= 6)
- break;
- }
- }
- }
-
- return new Bitmap(PixelFormat.Bgra8888, AlphaFormat.Premul, square.GetPixels(), new PixelSize(Size, Size),
- new Vector(96, 96), square.RowBytes);
- }
-
- /// <summary>
- /// Extracts a representative frame of video <paramref name="path"/> using FFmpeg and decodes it into a <see cref="Size"/> square.
- /// Null when FFmpeg is unavailable, video is broken, or frame decoding fails.
- /// </summary>
- internal static Bitmap? DecodeVideo(string path, long maxPixels)
- {
- var ffmpeg = FfmpegConverter.Locate()?.Ffmpeg;
- if (ffmpeg is null || !File.Exists(ffmpeg))
- return null;
-
- // Try seeking to 1s first (avoids blank/black title frame), then fall back to the beginning (e.g. videos shorter than 1s).
- var frameBytes = ExtractVideoFrame(ffmpeg, path, seekSeconds: 1)
- ?? ExtractVideoFrame(ffmpeg, path, seekSeconds: null);
- if (frameBytes is null || frameBytes.Length == 0)
- return null;
-
- try
- {
- using var data = SKData.CreateCopy(frameBytes);
- using var codec = SKCodec.Create(data);
- if (codec is null || codec.Info.Width <= 0 || codec.Info.Height <= 0)
- return null;
-
- var scale = Math.Min(1f, (float)Size / Math.Min(codec.Info.Width, codec.Info.Height));
- var scaled = codec.GetScaledDimensions(scale);
- if (scaled.Width <= 0 || scaled.Height <= 0 || (long)scaled.Width * scaled.Height > maxPixels)
- return null;
-
- var info = new SKImageInfo(scaled.Width, scaled.Height, SKColorType.Bgra8888, SKAlphaType.Premul);
- using var decoded = new SKBitmap(info);
- if (codec.GetPixels(info, decoded.GetPixels()) is not (SKCodecResult.Success or SKCodecResult.IncompleteInput))
- return null;
-
- return Square(decoded, codec.EncodedOrigin);
- }
- catch (Exception)
- {
- return null;
- }
- }
-
- private static byte[]? ExtractVideoFrame(string ffmpeg, string path, int? seekSeconds)
- {
- var tempPng = Path.Combine(Path.GetTempPath(), $"filee-thumb-{Guid.NewGuid():N}.png");
- try
- {
- var psi = new ProcessStartInfo(ffmpeg)
- {
- UseShellExecute = false,
- CreateNoWindow = true,
- };
- psi.ArgumentList.Add("-hide_banner");
- psi.ArgumentList.Add("-nostdin");
- psi.ArgumentList.Add("-v");
- psi.ArgumentList.Add("error");
- if (seekSeconds.HasValue)
- {
- psi.ArgumentList.Add("-ss");
- psi.ArgumentList.Add(seekSeconds.Value.ToString(CultureInfo.InvariantCulture));
- }
- psi.ArgumentList.Add("-i");
- psi.ArgumentList.Add(Path.GetFullPath(path));
- psi.ArgumentList.Add("-frames:v");
- psi.ArgumentList.Add("1");
- psi.ArgumentList.Add("-y");
- psi.ArgumentList.Add(tempPng);
-
- using var process = new Process { StartInfo = psi };
- if (!process.Start())
- return null;
-
- if (!process.WaitForExit(15_000))
- {
- try
- {
- if (!process.HasExited)
- process.Kill(entireProcessTree: true);
- }
- catch { }
- return null;
- }
-
- if (process.ExitCode == 0 && File.Exists(tempPng))
- {
- return File.ReadAllBytes(tempPng);
- }
- return null;
- }
- catch (Exception)
- {
- return null;
- }
- finally
- {
- try
- {
- if (File.Exists(tempPng))
- File.Delete(tempPng);
- }
- catch { }
- }
- }
-
/// <summary>
/// Decodes <paramref name="path"/> into a <see cref="Size"/> square: upright (the EXIF orientation applied) and
/// cropped from the middle. Null when it can't, or would have to decode more than <paramref name="maxPixels"/>.
@@ -528,7 +125,7 @@ internal static class HistoryThumbnails
}
}
- private static Bitmap Square(SKBitmap source, SKEncodedOrigin origin, bool fromTop = false)
+ private static Bitmap Square(SKBitmap source, SKEncodedOrigin origin)
{
// Upright first: the orientations from LeftTop on turn the picture a quarter, swapping width and height.
var turned = origin >= SKEncodedOrigin.LeftTop;
@@ -542,8 +139,7 @@ internal static class HistoryThumbnails
}
var side = Math.Min(upright.Width, upright.Height);
- var cropY = fromTop ? 0f : (upright.Height - side) / 2f;
- var crop = SKRect.Create((upright.Width - side) / 2f, cropY, side, side);
+ var crop = SKRect.Create((upright.Width - side) / 2f, (upright.Height - side) / 2f, side, side);
using var square = new SKBitmap(new SKImageInfo(Size, Size, SKColorType.Bgra8888, SKAlphaType.Premul));
using (var canvas = new SKCanvas(square))
using (var image = SKImage.FromBitmap(upright))
diff --git a/src/Filee.App/Services/MaterialYouPalette.cs b/src/Filee.App/Services/MaterialYouPalette.cs
index d19824a5..1a949c4e 100644
--- a/src/Filee.App/Services/MaterialYouPalette.cs
+++ b/src/Filee.App/Services/MaterialYouPalette.cs
@@ -1,6 +1,6 @@
// Material Design 3 dynamic tonal palette generator for Filee.
// Generates variant-specific theme resources (surfaces, text, borders, shadows, and accent roles)
-// from a seed colour. Built strictly on Filee's existing theme resource keys.
+// from a seed colour using perceptual HSL tonal mapping. Built strictly on Filee's existing theme resource keys.
using Avalonia;
using Avalonia.Controls;
@@ -42,11 +42,19 @@ public sealed class MaterialYouPalette
["WarningBrush"] = new SolidColorBrush(Warning),
["CardShadow"] = CardShadow,
+ ["AccentColor"] = Accent,
["AccentBrush"] = new SolidColorBrush(Accent),
["AccentSoftBrush"] = new SolidColorBrush(AccentSoft),
["AccentFaintBrush"] = new SolidColorBrush(AccentFaint),
["AccentStrongBrush"] = new SolidColorBrush(AccentStrong),
["OnAccentBrush"] = new SolidColorBrush(OnAccent),
+ ["SystemAccentColor"] = Accent,
+ ["SystemAccentColorLight1"] = SoftPalette.Shade(Accent, 0.15),
+ ["SystemAccentColorLight2"] = SoftPalette.Shade(Accent, 0.30),
+ ["SystemAccentColorLight3"] = SoftPalette.Shade(Accent, 0.45),
+ ["SystemAccentColorDark1"] = SoftPalette.Shade(Accent, -0.15),
+ ["SystemAccentColorDark2"] = SoftPalette.Shade(Accent, -0.30),
+ ["SystemAccentColorDark3"] = SoftPalette.Shade(Accent, -0.45),
};
/// <summary>True if the colour is monochrome (low saturation or black/white/charcoal).</summary>
diff --git a/src/Filee.App/Services/Motion.cs b/src/Filee.App/Services/Motion.cs
index c0d4c332..db141a98 100644
--- a/src/Filee.App/Services/Motion.cs
+++ b/src/Filee.App/Services/Motion.cs
@@ -62,9 +62,6 @@ public static class Motion
Changed?.Invoke(null, EventArgs.Empty);
}
- /// <summary>Optional callback invoked whenever a window is tracked.</summary>
- public static Action<Window>? WindowTracked { get; set; }
-
/// <summary>Call once per window so its styles follow the setting.</summary>
public static void Track(Window window)
{
@@ -74,19 +71,6 @@ public static class Motion
Windows.Add(new WeakReference<Window>(window));
}
Apply(window);
- WindowTracked?.Invoke(window);
- }
-
- /// <summary>Executes <paramref name="action"/> on all live tracked windows.</summary>
- public static void ForEachTracked(Action<Window> action)
- {
- lock (Windows)
- {
- Windows.RemoveAll(w => !w.TryGetTarget(out _));
- foreach (var weak in Windows)
- if (weak.TryGetTarget(out var window))
- action(window);
- }
}
private static void Apply(Window window) => window.Classes.Set("reduced-motion", !Enabled);
diff --git a/src/Filee.App/Services/SoftPalette.cs b/src/Filee.App/Services/SoftPalette.cs
index 628d1f46..276fd953 100644
--- a/src/Filee.App/Services/SoftPalette.cs
+++ b/src/Filee.App/Services/SoftPalette.cs
@@ -30,6 +30,31 @@ internal static class SoftPalette
private static readonly (string Embedded, string System) Chinese =
("fonts:Filee#Noto Sans SC", "Microsoft YaHei, PingFang SC");
+ /// <summary>All resource keys written by ApplyAccent that must be cleared from top level when per-variant dictionaries are used.</summary>
+ public static readonly string[] AccentResourceKeys =
+ [
+ "AccentColor",
+ "AccentBrush",
+ "AccentSoftBrush",
+ "AccentFaintBrush",
+ "AccentStrongBrush",
+ "OnAccentBrush",
+ "SystemAccentColor",
+ "SystemAccentColorLight1",
+ "SystemAccentColorLight2",
+ "SystemAccentColorLight3",
+ "SystemAccentColorDark1",
+ "SystemAccentColorDark2",
+ "SystemAccentColorDark3",
+ ];
+
+ /// <summary>Removes top-level accent keys so ThemeDictionaries take effect without being shadowed.</summary>
+ public static void ClearTopLevelAccent(IResourceDictionary res)
+ {
+ foreach (var key in AccentResourceKeys)
+ res.Remove(key);
+ }
+
/// <summary>Accent colour + derived shades. Fluent controls read the System* keys.</summary>
public static void ApplyAccent(IResourceDictionary res, Color accent)
{
@@ -62,6 +87,13 @@ internal static class SoftPalette
dict["AccentFaintBrush"] = new SolidColorBrush(accent, isDark ? 0.08 : 0.05);
dict["AccentStrongBrush"] = new SolidColorBrush(accent);
dict["OnAccentBrush"] = new SolidColorBrush(onAccent);
+ dict["SystemAccentColor"] = accent;
+ dict["SystemAccentColorLight1"] = Shade(accent, 0.15);
+ dict["SystemAccentColorLight2"] = Shade(accent, 0.30);
+ dict["SystemAccentColorLight3"] = Shade(accent, 0.45);
+ dict["SystemAccentColorDark1"] = Shade(accent, -0.15);
+ dict["SystemAccentColorDark2"] = Shade(accent, -0.30);
+ dict["SystemAccentColorDark3"] = Shade(accent, -0.45);
}
/// <summary>"Softness": one radius drives every control.</summary>
@@ -73,6 +105,7 @@ internal static class SoftPalette
res["SoftRadiusLarge"] = new CornerRadius(Math.Round(r * 1.35));
res["ControlCornerRadius"] = new CornerRadius(Math.Round(r * 0.55));
res["OverlayCornerRadius"] = new CornerRadius(r);
+ res["SoftRadiusPill"] = new CornerRadius(Math.Round(r * 2.5));
}
/// <summary>
diff --git a/src/Filee.App/Services/ThemeService.cs b/src/Filee.App/Services/ThemeService.cs
index aa561ce6..6b127c59 100644
--- a/src/Filee.App/Services/ThemeService.cs
+++ b/src/Filee.App/Services/ThemeService.cs
@@ -12,15 +12,12 @@ using Filee.Core.Settings;
namespace Filee.App.Services;
/// <summary>Runtime theming.</summary>
-public sealed class ThemeService
+public sealed class ThemeService(IPlatformServices platform)
{
- private readonly IPlatformServices _platform;
+ private readonly IPlatformServices _platform = platform;
- public ThemeService(IPlatformServices platform)
- {
- _platform = platform;
- Motion.WindowTracked = window => window.Classes.Set("material-you", IsMaterialYou);
- }
+ /// <summary>Applies or removes the "material-you" style class on a window.</summary>
+ public void ApplyWindowClass(Window window) => window.Classes.Set("material-you", IsMaterialYou);
/// <summary>Accent swatches offered in the Theme page.</summary>
public static readonly IReadOnlyList<string> Swatches =
@@ -84,18 +81,27 @@ public sealed class ThemeService
_ => ThemeVariant.Default,
};
- var accent = Color.TryParse(theme.Accent, out var parsed) ? parsed : Color.Parse(SoftPalette.DefaultAccent);
+ // Determine effective accent colors:
+ // If a coordinated light/dark preset is active, use its respective variant colors.
+ ThemePreset? preset = null;
+ if (!string.IsNullOrEmpty(theme.PresetKey))
+ preset = Presets.FirstOrDefault(p => string.Equals(p.Key, theme.PresetKey, StringComparison.OrdinalIgnoreCase));
+
+ var defaultColor = Color.Parse(SoftPalette.DefaultAccent);
+ var baseColor = Color.TryParse(theme.Accent, out var parsed) ? parsed : defaultColor;
+
+ var lightAccent = preset?.LightColor ?? baseColor;
+ var darkAccent = preset?.DarkColor ?? baseColor;
- // Accent colour + derived shades, corner radii and the font order (shared with the installer).
- SoftPalette.ApplyAccent(res, accent);
+ // Radii, fonts, flow direction
SoftPalette.ApplyCornerRadius(res, theme.CornerRadius);
res["AppFontFamily"] = SoftPalette.FontFamilyFor(language);
SoftPalette.ApplyFlowDirection(res, language);
if (theme.Style == ThemeStyle.MaterialYou)
{
- var lightPalette = MaterialYouPalette.Generate(accent, isDark: false);
- var darkPalette = MaterialYouPalette.Generate(accent, isDark: true);
+ var lightPalette = MaterialYouPalette.Generate(lightAccent, isDark: false);
+ var darkPalette = MaterialYouPalette.Generate(darkAccent, isDark: true);
var lightDict = lightPalette.ToResourceDictionary();
var darkDict = darkPalette.ToResourceDictionary();
@@ -105,10 +111,13 @@ public sealed class ThemeService
res.ThemeDictionaries[ThemeVariant.Light] = lightDict;
res.ThemeDictionaries[ThemeVariant.Dark] = darkDict;
+
+ // Clear top-level accent keys so controls resolve variant-specific roles from ThemeDictionaries
+ SoftPalette.ClearTopLevelAccent(res);
}
else
{
- if (MaterialYouPalette.IsMonochrome(accent))
+ if (MaterialYouPalette.IsMonochrome(baseColor) || preset?.Key == "monochrome")
{
var lightDict = new ResourceDictionary();
var darkDict = new ResourceDictionary();
@@ -118,16 +127,33 @@ public sealed class ThemeService
ApplyCustomOverrides(darkDict, custom?.Dark);
res.ThemeDictionaries[ThemeVariant.Light] = lightDict;
res.ThemeDictionaries[ThemeVariant.Dark] = darkDict;
+
+ // Clear top-level so dark mode resolves silvery white and light mode resolves charcoal
+ SoftPalette.ClearTopLevelAccent(res);
+ }
+ else if (preset != null)
+ {
+ var lightDict = new ResourceDictionary();
+ var darkDict = new ResourceDictionary();
+ SoftPalette.ApplyAccent(lightDict, lightAccent);
+ SoftPalette.ApplyAccent(darkDict, darkAccent);
+ ApplyCustomOverrides(lightDict, custom?.Light);
+ ApplyCustomOverrides(darkDict, custom?.Dark);
+ res.ThemeDictionaries[ThemeVariant.Light] = lightDict;
+ res.ThemeDictionaries[ThemeVariant.Dark] = darkDict;
+
+ // Clear top-level so light/dark preset pair resolves correctly under System theme
+ SoftPalette.ClearTopLevelAccent(res);
}
else
{
+ SoftPalette.ApplyAccent(res, baseColor);
ApplyCustom(res, ThemeVariant.Light, custom?.Light);
ApplyCustom(res, ThemeVariant.Dark, custom?.Dark);
}
}
var isMaterialYou = theme.Style == ThemeStyle.MaterialYou;
- Motion.ForEachTracked(w => w.Classes.Set("material-you", isMaterialYou));
if (app.ApplicationLifetime is Avalonia.Controls.ApplicationLifetimes.IClassicDesktopStyleApplicationLifetime desktop)
{
foreach (var window in desktop.Windows)
diff --git a/src/Filee.App/Services/WindowService.cs b/src/Filee.App/Services/WindowService.cs
index ac4347e7..ff97d265 100644
--- a/src/Filee.App/Services/WindowService.cs
+++ b/src/Filee.App/Services/WindowService.cs
@@ -34,11 +34,14 @@ public sealed class WindowService(ILocalizer loc, IServiceProvider services, Mem
internal MergeOrderWindow? MergeOrder => _mergeOrder;
+ private void PrepareWindow(Window window) => services.GetService<ThemeService>()?.ApplyWindowClass(window);
+
/// <summary>Reviews the order of a PDF merge. Closing or cancelling starts no conversion.</summary>
public async Task<IReadOnlyList<string>?> ChooseMergeOrderAsync(IReadOnlyList<string> files)
{
_mergeOrder?.Close();
var dialog = new MergeOrderWindow { DataContext = new MergeOrderViewModel(files) };
+ PrepareWindow(dialog);
var closed = new TaskCompletionSource(TaskCreationOptions.RunContinuationsAsynchronously);
dialog.Closed += (_, _) =>
{
@@ -64,6 +67,7 @@ public sealed class WindowService(ILocalizer loc, IServiceProvider services, Mem
var log = services.GetService<ILogger<CropOverlayViewModel>>();
var vm = new CropOverlayViewModel(files, preset, loc, store, log);
var win = new CropOverlayWindow { DataContext = vm };
+ PrepareWindow(win);
win.PositionOnScreen(near);
win.Closed += (_, _) =>
{
@@ -86,6 +90,7 @@ public sealed class WindowService(ILocalizer loc, IServiceProvider services, Mem
{
var model = ActivatorUtilities.CreateInstance<MainWindowViewModel>(services);
var main = new MainWindow { DataContext = model };
+ PrepareWindow(main);
if (_mainPlacement is { } placement)
{
placement.ApplyTo(main);
@@ -130,6 +135,7 @@ public sealed class WindowService(ILocalizer loc, IServiceProvider services, Mem
_whatsNew?.Close();
Motion.Refresh();
var window = new WhatsNewWindow(deck, loc);
+ PrepareWindow(window);
window.Closed += (_, _) =>
{
if (_whatsNew == window)
@@ -167,6 +173,7 @@ public sealed class WindowService(ILocalizer loc, IServiceProvider services, Mem
if (install is not null && !vm.InstallNow(install))
return;
_engineSetup = new EngineSetupWindow { DataContext = vm };
+ PrepareWindow(_engineSetup);
_engineSetup.Closed += (_, _) => _engineSetup = null;
_engineSetup.Show();
}
@@ -174,7 +181,11 @@ public sealed class WindowService(ILocalizer loc, IServiceProvider services, Mem
/// <summary>Creates the toast window once; it shows and hides itself with the job list.</summary>
public void EnsureToast()
{
- _toast ??= new ToastWindow { DataContext = services.GetRequiredService<ConversionService>() };
+ if (_toast is null)
+ {
+ _toast = new ToastWindow { DataContext = services.GetRequiredService<ConversionService>() };
+ PrepareWindow(_toast);
+ }
}
/// <summary>Shows the "new version available" card in the bottom-right corner (above a visible toast).</summary>
@@ -187,6 +198,7 @@ public sealed class WindowService(ILocalizer loc, IServiceProvider services, Mem
? (int)Math.Ceiling(toast.Bounds.Height * (toast.Screens.Primary?.Scaling ?? 1))
: 0,
};
+ PrepareWindow(notice);
notice.Closed += (_, _) =>
{
if (_updateNotice == notice)
@@ -216,6 +228,7 @@ public sealed class WindowService(ILocalizer loc, IServiceProvider services, Mem
? (int)Math.Ceiling(update.Bounds.Height * (update.Screens.Primary?.Scaling ?? 1))
: 0,
};
+ PrepareWindow(notice);
notice.Closed += (_, _) =>
{
if (_engineNotice == notice)
@@ -231,6 +244,7 @@ public sealed class WindowService(ILocalizer loc, IServiceProvider services, Mem
if (_feedbackNotice is not null)
return;
_feedbackNotice = new FeedbackNoticeWindow();
+ PrepareWindow(_feedbackNotice);
_feedbackNotice.Closed += (_, _) => _feedbackNotice = null;
_feedbackNotice.Show();
}
@@ -241,7 +255,9 @@ public sealed class WindowService(ILocalizer loc, IServiceProvider services, Mem
if (_elevationNoticeShown)
return;
_elevationNoticeShown = true;
- new ElevationNoticeWindow(services.GetRequiredService<ElevationService>()).Show();
+ var elevation = new ElevationNoticeWindow(services.GetRequiredService<ElevationService>());
+ PrepareWindow(elevation);
+ elevation.Show();
}
private bool _elevationNoticeShown;
@@ -253,6 +269,7 @@ public sealed class WindowService(ILocalizer loc, IServiceProvider services, Mem
{
_formatRequestNotice?.Close();
var notice = new FormatRequestNoticeWindow(extensions, loc.Format("format_request.notice_title", FormatRequest.Label(extensions)));
+ PrepareWindow(notice);
notice.Closed += (_, _) =>
{
if (_formatRequestNotice == notice)
@@ -273,6 +290,7 @@ public sealed class WindowService(ILocalizer loc, IServiceProvider services, Mem
DataContext = new PresetEditorViewModel(preset, loc),
Topmost = owner?.Topmost ?? false,
};
+ PrepareWindow(dialog);
owner ??= _main ?? MainWindowOrNull();
if (owner is null || !owner.IsVisible)
{
@@ -301,6 +319,7 @@ public sealed class WindowService(ILocalizer loc, IServiceProvider services, Mem
Topmost = owner?.Topmost ?? false,
Confirm = (editor, message) => ConfirmAsync(editor, message, destructive: true),
};
+ PrepareWindow(dialog);
if (visibleOwner is null)
{
var closed = new TaskCompletionSource();
@@ -339,6 +358,7 @@ public sealed class WindowService(ILocalizer loc, IServiceProvider services, Mem
WindowStartupLocation = WindowStartupLocation.CenterOwner,
ShowInTaskbar = false,
};
+ PrepareWindow(dialog);
Motion.Track(dialog);
var yes = new Button { Content = destructive ? loc["common.delete"] : loc["common.ok"], IsDefault = true };
yes.Classes.Add("accent");
diff --git a/src/Filee.App/Styles/Soft.axaml b/src/Filee.App/Styles/Soft.axaml
index 3ad617a2..f82fbe28 100644
--- a/src/Filee.App/Styles/Soft.axaml
+++ b/src/Filee.App/Styles/Soft.axaml
@@ -22,6 +22,11 @@
<SolidColorBrush x:Key="SuccessBrush" Color="#0F7A5A" />
<SolidColorBrush x:Key="WarningBrush" Color="#9A5B0C" />
<BoxShadows x:Key="CardShadow">0 1 3 0 #12000000, 0 6 18 0 #0D000000</BoxShadows>
+ <SolidColorBrush x:Key="AccentBrush" Color="#7F77DD" />
+ <SolidColorBrush x:Key="AccentSoftBrush" Color="#2E7F77DD" />
+ <SolidColorBrush x:Key="AccentFaintBrush" Color="#177F77DD" />
+ <SolidColorBrush x:Key="AccentStrongBrush" Color="#5F59A6" />
+ <SolidColorBrush x:Key="OnAccentBrush" Color="#FFFFFF" />
</ResourceDictionary>
<ResourceDictionary x:Key="Dark">
<SolidColorBrush x:Key="PageBrush" Color="#1B1B19" />
@@ -34,15 +39,15 @@
<SolidColorBrush x:Key="SuccessBrush" Color="#5DCAA5" />
<SolidColorBrush x:Key="WarningBrush" Color="#EF9F27" />
<BoxShadows x:Key="CardShadow">0 1 3 0 #40000000, 0 8 24 0 #33000000</BoxShadows>
+ <SolidColorBrush x:Key="AccentBrush" Color="#7F77DD" />
+ <SolidColorBrush x:Key="AccentSoftBrush" Color="#2E7F77DD" />
+ <SolidColorBrush x:Key="AccentFaintBrush" Color="#177F77DD" />
+ <SolidColorBrush x:Key="AccentStrongBrush" Color="#5F59A6" />
+ <SolidColorBrush x:Key="OnAccentBrush" Color="#FFFFFF" />
</ResourceDictionary>
</ResourceDictionary.ThemeDictionaries>
<!-- Defaults; ThemeService overwrites these at startup. -->
- <SolidColorBrush x:Key="AccentBrush" Color="#7F77DD" />
- <SolidColorBrush x:Key="AccentSoftBrush" Color="#2E7F77DD" />
- <SolidColorBrush x:Key="AccentFaintBrush" Color="#177F77DD" />
- <SolidColorBrush x:Key="AccentStrongBrush" Color="#5F59A6" />
- <SolidColorBrush x:Key="OnAccentBrush" Color="#FFFFFF" />
<CornerRadius x:Key="SoftRadius">16</CornerRadius>
<CornerRadius x:Key="SoftRadiusSmall">9</CornerRadius>
<CornerRadius x:Key="SoftRadiusLarge">22</CornerRadius>
@@ -265,35 +270,35 @@
</Style>
<Style Selector="Window.material-you Slider:horizontal /template/ Border#TrackBackground">
<Setter Property="Height" Value="16" />
- <Setter Property="CornerRadius" Value="999" />
+ <Setter Property="CornerRadius" Value="{DynamicResource SoftRadiusPill}" />
<Setter Property="Background" Value="{DynamicResource SurfaceAltBrush}" />
</Style>
<Style Selector="Window.material-you Slider:horizontal /template/ RepeatButton#PART_DecreaseButton">
<Setter Property="Background" Value="{DynamicResource AccentBrush}" />
<Setter Property="Height" Value="16" />
- <Setter Property="CornerRadius" Value="999" />
+ <Setter Property="CornerRadius" Value="{DynamicResource SoftRadiusPill}" />
<Setter Property="VerticalAlignment" Value="Center" />
</Style>
<Style Selector="Window.material-you Slider:horizontal /template/ RepeatButton#PART_DecreaseButton /template/ Border">
<Setter Property="Background" Value="{DynamicResource AccentBrush}" />
<Setter Property="Height" Value="16" />
- <Setter Property="CornerRadius" Value="999" />
+ <Setter Property="CornerRadius" Value="{DynamicResource SoftRadiusPill}" />
</Style>
<Style Selector="Window.material-you Slider:horizontal /template/ RepeatButton#PART_IncreaseButton">
<Setter Property="Background" Value="{DynamicResource SurfaceAltBrush}" />
<Setter Property="Height" Value="16" />
- <Setter Property="CornerRadius" Value="999" />
+ <Setter Property="CornerRadius" Value="{DynamicResource SoftRadiusPill}" />
<Setter Property="VerticalAlignment" Value="Center" />
</Style>
<Style Selector="Window.material-you Slider:horizontal /template/ RepeatButton#PART_IncreaseButton /template/ Border">
<Setter Property="Background" Value="{DynamicResource SurfaceAltBrush}" />
<Setter Property="Height" Value="16" />
- <Setter Property="CornerRadius" Value="999" />
+ <Setter Property="CornerRadius" Value="{DynamicResource SoftRadiusPill}" />
</Style>
<Style Selector="Window.material-you Slider:horizontal /template/ Thumb#PART_Thumb">
<Setter Property="Width" Value="8" />
<Setter Property="Height" Value="28" />
- <Setter Property="CornerRadius" Value="999" />
+ <Setter Property="CornerRadius" Value="{DynamicResource SoftRadiusPill}" />
<Setter Property="Background" Value="{DynamicResource AccentBrush}" />
<Setter Property="BorderBrush" Value="{DynamicResource SurfaceBrush}" />
<Setter Property="BorderThickness" Value="1.5" />
@@ -344,7 +349,7 @@
<Setter Property="RenderTransform" Value="scale(1.02)" />
</Style>
<Style Selector="Window.material-you ToggleSwitch /template/ Border#SwitchKnobBounds">
- <Setter Property="CornerRadius" Value="999" />
+ <Setter Property="CornerRadius" Value="{DynamicResource SoftRadiusPill}" />
<Setter Property="Transitions">
<Transitions>
<BrushTransition Property="Background" Duration="0:0:0.18" />
@@ -370,7 +375,7 @@
<!-- CheckBox: M3 accent states & soft rounded squircle -->
<Style Selector="Window.material-you CheckBox /template/ Border#NormalRectangle">
- <Setter Property="CornerRadius" Value="6" />
+ <Setter Property="CornerRadius" Value="{DynamicResource SoftRadiusSmall}" />
<Setter Property="Width" Value="20" />
<Setter Property="Height" Value="20" />
<Setter Property="BorderThickness" Value="1.5" />
@@ -390,43 +395,43 @@
<Setter Property="Stroke" Value="{DynamicResource OnAccentBrush}" />
</Style>
- <!-- Cards: M3 elevated tonal surface with refined rounded corners -->
+ <!-- Cards: M3 elevated tonal surface with dynamic softness -->
<Style Selector="Window.material-you Border.card">
- <Setter Property="CornerRadius" Value="16" />
+ <Setter Property="CornerRadius" Value="{DynamicResource SoftRadius}" />
<Setter Property="Padding" Value="20,18" />
</Style>
<!-- Recent conversion thumbnails: soft M3 rounded tile -->
<Style Selector="Window.material-you Border.history-thumbnail">
- <Setter Property="CornerRadius" Value="12" />
+ <Setter Property="CornerRadius" Value="{DynamicResource SoftRadiusSmall}" />
</Style>
- <!-- Buttons: M3 full pill with spring press (excluding multi-line choice cards) -->
+ <!-- Buttons: M3 rounded pill derived from SoftRadius -->
<Style Selector="Window.material-you Button:not(.choice-card), Window.material-you ToggleButton">
- <Setter Property="CornerRadius" Value="999" />
+ <Setter Property="CornerRadius" Value="{DynamicResource SoftRadiusPill}" />
<Setter Property="Padding" Value="18,8" />
<Setter Property="FontWeight" Value="Medium" />
</Style>
- <!-- Chips & Badges: M3 pill styling -->
+ <!-- Chips & Badges: M3 rounded styling derived from SoftRadius -->
<Style Selector="Window.material-you Border.chip">
- <Setter Property="CornerRadius" Value="999" />
+ <Setter Property="CornerRadius" Value="{DynamicResource SoftRadiusPill}" />
<Setter Property="Padding" Value="14,6" />
</Style>
<Style Selector="Window.material-you Border.badge">
- <Setter Property="CornerRadius" Value="999" />
+ <Setter Property="CornerRadius" Value="{DynamicResource SoftRadiusPill}" />
<Setter Property="Padding" Value="10,3" />
</Style>
- <!-- DropZone tile: generous M3 rounded shape -->
+ <!-- DropZone tile: generous M3 rounded shape derived from SoftRadiusLarge -->
<Style Selector="Window.material-you Border#DropZone">
- <Setter Property="CornerRadius" Value="24" />
+ <Setter Property="CornerRadius" Value="{DynamicResource SoftRadiusLarge}" />
</Style>
<!-- Dropdowns (ComboBox): Material 3 rounded container & popups -->
<Style Selector="Window.material-you ComboBox">
<Setter Property="MinHeight" Value="38" />
- <Setter Property="CornerRadius" Value="20" />
+ <Setter Property="CornerRadius" Value="{DynamicResource SoftRadius}" />
<Setter Property="Background" Value="{DynamicResource SurfaceAltBrush}" />
<Setter Property="BorderBrush" Value="{DynamicResource SubtleBorderBrush}" />
<Setter Property="BorderThickness" Value="1" />
@@ -436,7 +441,7 @@
<Setter Property="BorderBrush" Value="{DynamicResource AccentBrush}" />
</Style>
<Style Selector="Window.material-you ComboBox /template/ Border#PopupBorder">
- <Setter Property="CornerRadius" Value="18" />
+ <Setter Property="CornerRadius" Value="{DynamicResource SoftRadius}" />
<Setter Property="Background" Value="{DynamicResource SurfaceBrush}" />
<Setter Property="BorderBrush" Value="{DynamicResource SubtleBorderBrush}" />
<Setter Property="BorderThickness" Value="1" />
@@ -444,7 +449,7 @@
<Setter Property="BoxShadow" Value="{DynamicResource CardShadow}" />
</Style>
<Style Selector="Window.material-you ComboBoxItem">
- <Setter Property="CornerRadius" Value="14" />
+ <Setter Property="CornerRadius" Value="{DynamicResource SoftRadiusSmall}" />
<Setter Property="Padding" Value="14,8" />
<Setter Property="Margin" Value="0,1" />
</Style>
@@ -454,10 +459,10 @@
<Setter Property="FontWeight" Value="SemiBold" />
</Style>
- <!-- Text inputs: clean rounded corners following M3 SoftRadiusSmall -->
+ <!-- Text inputs: clean rounded corners following SoftRadius -->
<Style Selector="Window.material-you TextBox">
<Setter Property="MinHeight" Value="38" />
- <Setter Property="CornerRadius" Value="20" />
+ <Setter Property="CornerRadius" Value="{DynamicResource SoftRadius}" />
<Setter Property="Background" Value="{DynamicResource SurfaceAltBrush}" />
<Setter Property="BorderBrush" Value="{DynamicResource SubtleBorderBrush}" />
<Setter Property="BorderThickness" Value="1" />
@@ -470,7 +475,7 @@
<!-- NumericUpDown: clean rounded corners and seamless spinner buttons -->
<Style Selector="Window.material-you NumericUpDown">
<Setter Property="MinHeight" Value="38" />
- <Setter Property="CornerRadius" Value="20" />
+ <Setter Property="CornerRadius" Value="{DynamicResource SoftRadius}" />
<Setter Property="ClipToBounds" Value="True" />
<Setter Property="Background" Value="{DynamicResource SurfaceAltBrush}" />
<Setter Property="BorderBrush" Value="{DynamicResource SubtleBorderBrush}" />
@@ -482,12 +487,12 @@
<Style Selector="Window.material-you NumericUpDown /template/ ButtonSpinner#PART_Spinner">
<Setter Property="Background" Value="Transparent" />
<Setter Property="BorderThickness" Value="0" />
- <Setter Property="CornerRadius" Value="20" />
+ <Setter Property="CornerRadius" Value="{DynamicResource SoftRadius}" />
</Style>
<Style Selector="Window.material-you NumericUpDown /template/ TextBox#PART_TextBox">
<Setter Property="Background" Value="Transparent" />
<Setter Property="BorderThickness" Value="0" />
- <Setter Property="CornerRadius" Value="20" />
+ <Setter Property="CornerRadius" Value="{DynamicResource SoftRadius}" />
<Setter Property="Padding" Value="16,8" />
</Style>
<Style Selector="Window.material-you ButtonSpinner /template/ RepeatButton">
@@ -518,10 +523,10 @@
</Style>
<!-- ───────── Reduced motion: remove every transition and animation above ───────── -->
- <Style Selector="Window.reduced-motion :is(Button), Window.reduced-motion :is(ToggleButton), Window.reduced-motion Border.chip, Window.reduced-motion ListBoxItem, Window.reduced-motion Slider /template/ Thumb#PART_Thumb">
+ <Style Selector="Window.reduced-motion :is(Button), Window.reduced-motion :is(ToggleButton), Window.reduced-motion Border.chip, Window.reduced-motion ListBoxItem, Window.reduced-motion Slider /template/ Thumb#PART_Thumb, Window.reduced-motion ToggleSwitch, Window.reduced-motion ToggleSwitch /template/ Border#SwitchKnobBounds, Window.reduced-motion ToggleSwitch /template/ Ellipse#SwitchKnob, Window.reduced-motion CheckBox /template/ Border#NormalRectangle, Window.reduced-motion CheckBox /template/ Path#CheckGlyph, Window.reduced-motion Button.choice-card, Window.reduced-motion Button.preset-pill">
<Setter Property="Transitions" Value="{x:Null}" />
</Style>
- <Style Selector="Window.reduced-motion Button:pressed, Window.reduced-motion ToggleButton:pressed, Window.reduced-motion Border.chip:pointerover, Window.reduced-motion ListBox.nav ListBoxItem:pointerover, Window.reduced-motion Slider /template/ Thumb#PART_Thumb:pointerover">
+ <Style Selector="Window.reduced-motion Button:pressed, Window.reduced-motion ToggleButton:pressed, Window.reduced-motion Border.chip:pointerover, Window.reduced-motion ListBox.nav ListBoxItem:pointerover, Window.reduced-motion Slider /template/ Thumb#PART_Thumb:pointerover, Window.reduced-motion Slider /template/ Thumb#PART_Thumb:pressed, Window.reduced-motion ToggleSwitch:pointerover, Window.reduced-motion Button.choice-card:pointerover, Window.reduced-motion Button.preset-pill:pointerover, Window.reduced-motion Button.preset-pill:pressed">
<Setter Property="RenderTransform" Value="none" />
</Style>
<Style Selector="Window.reduced-motion ContentControl.page > :is(Control), Window.reduced-motion Border.history-card">
diff --git a/src/Filee.App/ViewModels/JobViewModel.cs b/src/Filee.App/ViewModels/JobViewModel.cs
index 990a1415..e5b06141 100644
--- a/src/Filee.App/ViewModels/JobViewModel.cs
+++ b/src/Filee.App/ViewModels/JobViewModel.cs
@@ -134,15 +134,7 @@ public sealed partial class JobViewModel : ObservableObject
{
var first = Job.Outputs.FirstOrDefault();
if (first is not null)
- {
- try
- {
- _platform.RevealInFileManager(first);
- }
- catch
- {
- }
- }
+ _platform.RevealInFileManager(first);
}
[RelayCommand]
diff --git a/src/Filee.App/ViewModels/Pages/GeneralPageViewModel.cs b/src/Filee.App/ViewModels/Pages/GeneralPageViewModel.cs
index 54eb8295..c55d3540 100644
--- a/src/Filee.App/ViewModels/Pages/GeneralPageViewModel.cs
+++ b/src/Filee.App/ViewModels/Pages/GeneralPageViewModel.cs
@@ -283,16 +283,7 @@ public sealed partial class GeneralPageViewModel : ObservableObject, IDisposable
}
[RelayCommand]
- private void OpenDataFolder()
- {
- try
- {
- _platform.RevealInFileManager(_store.Directory);
- }
- catch
- {
- }
- }
+ private void OpenDataFolder() => _platform.RevealInFileManager(_store.Directory);
public void Export(string path)
{
diff --git a/src/Filee.App/ViewModels/Pages/HomePageViewModel.cs b/src/Filee.App/ViewModels/Pages/HomePageViewModel.cs
index 81d345f6..447facf1 100644
--- a/src/Filee.App/ViewModels/Pages/HomePageViewModel.cs
+++ b/src/Filee.App/ViewModels/Pages/HomePageViewModel.cs
@@ -106,53 +106,21 @@ public sealed partial class HistoryItemViewModel : ObservableObject
{
// An output may be a folder ("Extract"): revealing it opens the extracted files.
if (_output is not null && ConversionService.Exists(_output))
- {
- try
- {
- _platform.RevealInFileManager(_output);
- }
- catch
- {
- }
- }
+ _platform.RevealInFileManager(_output);
}
[RelayCommand]
private void OpenFile()
{
if (CanOpen && ConversionService.Exists(_output!))
- {
- try
- {
- _platform.OpenFile(_output!);
- }
- catch
- {
- // Fall back to opening the containing folder with the file highlighted if the OS has no registered handler.
- try
- {
- _platform.RevealInFileManager(_output!);
- }
- catch
- {
- }
- }
- }
+ _platform.OpenFile(_output!);
}
[RelayCommand]
private void OpenWith()
{
if (CanOpenWith && File.Exists(_output))
- {
- try
- {
- _platform.OpenWith(_output!);
- }
- catch
- {
- }
- }
+ _platform.OpenWith(_output!);
}
}
diff --git a/src/Filee.App/ViewModels/Pages/ThemePageViewModel.cs b/src/Filee.App/ViewModels/Pages/ThemePageViewModel.cs
index 52fc60b4..c53fb949 100644
--- a/src/Filee.App/ViewModels/Pages/ThemePageViewModel.cs
+++ b/src/Filee.App/ViewModels/Pages/ThemePageViewModel.cs
@@ -29,7 +29,17 @@ public sealed partial class ThemePageViewModel : ObservableObject
Style = Styles.FirstOrDefault(s => s.Value == theme.Style) ?? Styles[0];
Modes = Enum.GetValues<ThemeMode>().Select(m => new Choice<ThemeMode>(m, loc[$"theme.mode.{m}"])).ToList();
Mode = Modes.First(m => m.Value == theme.Mode);
- Accent = Color.TryParse(theme.Accent, out var c) ? c : Colors.MediumPurple;
+ if (!string.IsNullOrEmpty(theme.PresetKey) &&
+ ThemeService.Presets.FirstOrDefault(p => string.Equals(p.Key, theme.PresetKey, StringComparison.OrdinalIgnoreCase)) is { } initialPreset)
+ {
+ var isDark = theme.Mode == ThemeMode.Dark ||
+ (theme.Mode == ThemeMode.System && Application.Current?.ActualThemeVariant == ThemeVariant.Dark);
+ Accent = initialPreset.ActiveColor(isDark);
+ }
+ else
+ {
+ Accent = Color.TryParse(theme.Accent, out var c) ? c : Colors.MediumPurple;
+ }
AccentHex = $"#{Accent.R:X2}{Accent.G:X2}{Accent.B:X2}";
CornerRadius = theme.CornerRadius;
DonutOpacity = Math.Round(Math.Clamp(store.Settings.Donut.Opacity, DonutSettings.MinOpacity, 1) * 100);
@@ -107,14 +117,36 @@ public sealed partial class ThemePageViewModel : ObservableObject
{
OnPropertyChanged(nameof(PastelPresets));
if (!Choices.Restore(oldValue, newValue, v => Mode = v))
- Save(t => t.Mode = newValue.Value);
+ {
+ Save(t =>
+ {
+ t.Mode = newValue.Value;
+ if (!string.IsNullOrEmpty(t.PresetKey) &&
+ ThemeService.Presets.FirstOrDefault(p => string.Equals(p.Key, t.PresetKey, StringComparison.OrdinalIgnoreCase)) is { } preset)
+ {
+ var isDark = newValue.Value == ThemeMode.Dark ||
+ (newValue.Value == ThemeMode.System && Application.Current?.ActualThemeVariant == ThemeVariant.Dark);
+ var newColor = preset.ActiveColor(isDark);
+ t.Accent = $"#{newColor.R:X2}{newColor.G:X2}{newColor.B:X2}";
+ Accent = newColor;
+ }
+ });
+ }
}
[RelayCommand]
- private void PickPreset(PresetItem preset) => Accent = preset.Color;
+ private void PickPreset(PresetItem preset)
+ {
+ Save(t => t.PresetKey = preset.Key);
+ Accent = preset.Color;
+ }
[RelayCommand]
- private void PickSwatch(Color color) => Accent = color;
+ private void PickSwatch(Color color)
+ {
+ Save(t => t.PresetKey = null);
+ Accent = color;
+ }
[RelayCommand]
private void SetStyle(ThemeStyle target)
@@ -136,7 +168,10 @@ public sealed partial class ThemePageViewModel : ObservableObject
partial void OnAccentHexChanged(string value)
{
if (Color.TryParse(value.Trim(), out var color) && color != Accent)
+ {
+ Save(t => t.PresetKey = null);
Accent = Color.FromRgb(color.R, color.G, color.B);
+ }
}
partial void OnCornerRadiusChanged(double value) => Save(t => t.CornerRadius = Math.Round(value));
partial void OnReduceMotionChanged(bool value) => Save(t => t.ReduceMotion = value);
diff --git a/src/Filee.App/Views/Pages/HomePage.axaml b/src/Filee.App/Views/Pages/HomePage.axaml
index 7c734c6d..e1eb35d9 100644
--- a/src/Filee.App/Views/Pages/HomePage.axaml
+++ b/src/Filee.App/Views/Pages/HomePage.axaml
@@ -54,9 +54,8 @@
</DockPanel>
</Border>
- <!-- Drop zone: files dropped here open the donut toolbar at the cursor. Double-click opens file selector. -->
+ <!-- Drop zone: files dropped here open the donut toolbar at the cursor. -->
<Border x:Name="DropZone" DragDrop.AllowDrop="True" MinHeight="220"
- Cursor="Hand" ToolTip.Tip="{DynamicResource home.drop_select}"
Background="{DynamicResource AccentFaintBrush}" BorderBrush="{DynamicResource AccentSoftBrush}"
BorderThickness="2" CornerRadius="{DynamicResource SoftRadiusLarge}" Padding="24">
<StackPanel HorizontalAlignment="Center" VerticalAlignment="Center" Spacing="10">
@@ -116,7 +115,7 @@
</StackPanel>
<!-- The result: its picture, else its format; the corner says whether the job went well. -->
<Panel DockPanel.Dock="Left" Width="42" Height="42" Margin="0,0,12,0">
- <Border Classes="history-thumbnail" CornerRadius="{DynamicResource SoftRadiusSmall}" ClipToBounds="True" Background="{DynamicResource AccentSoftBrush}">
+ <Border CornerRadius="{DynamicResource SoftRadiusSmall}" ClipToBounds="True" Background="{DynamicResource AccentSoftBrush}">
<Panel>
<Image Source="{Binding Thumbnail}" Stretch="UniformToFill" IsVisible="{Binding HasThumbnail}" />
<TextBlock Text="{Binding FormatBadge}" FontSize="11" FontWeight="Bold" Foreground="{DynamicResource TextPrimaryBrush}"
diff --git a/src/Filee.App/Views/Pages/HomePage.axaml.cs b/src/Filee.App/Views/Pages/HomePage.axaml.cs
index d285fed8..8980e269 100644
--- a/src/Filee.App/Views/Pages/HomePage.axaml.cs
+++ b/src/Filee.App/Views/Pages/HomePage.axaml.cs
@@ -1,10 +1,10 @@
+// Drop zone: files dropped on the Home page open the donut (click mode) at the drop position, also pictures, links and
+// downloads dragged from a browser.
+
using Avalonia;
using Avalonia.Controls;
using Avalonia.Input;
-using Avalonia.Interactivity;
-using Avalonia.Platform.Storage;
using Filee.App.Services;
-using Filee.Core.Localization;
using Microsoft.Extensions.Logging;
namespace Filee.App.Views.Pages;
@@ -20,7 +20,6 @@ public partial class HomePage : UserControl
public HomePage()
{
InitializeComponent();
- DropZone.DoubleTapped += OnDropZoneDoubleTapped;
DragDrop.AddDragEnterHandler(DropZone, (_, e) =>
{
DropZone.Classes.Add("over");
@@ -35,36 +34,6 @@ public partial class HomePage : UserControl
DragDrop.AddDropHandler(DropZone, OnDrop);
}
- private async void OnDropZoneDoubleTapped(object? sender, TappedEventArgs e)
- {
- e.Handled = true;
- if (TopLevel.GetTopLevel(this) is not { } top)
- return;
-
- var loc = AppHost.Get<ILocalizer>();
- var files = await top.StorageProvider.OpenFilePickerAsync(new FilePickerOpenOptions
- {
- AllowMultiple = true,
- Title = loc["home.drop_title"],
- });
-
- var paths = files
- .Select(f => f.TryGetLocalPath())
- .Where(p => !string.IsNullOrEmpty(p))
- .Select(p => p!)
- .ToList();
-
- if (paths.Count == 0)
- return;
-
- var clickPos = e.GetPosition(this);
- var targetPos = DropZone.Bounds.Contains(clickPos)
- ? clickPos
- : new Point(DropZone.Bounds.Width / 2, DropZone.Bounds.Height / 2);
- var screenPoint = this.PointToScreen(targetPos);
- AppHost.Get<RadialController>().ShowForFiles(screenPoint.X, screenPoint.Y, paths);
- }
-
private void OnDrop(object? sender, DragEventArgs e)
{
DropZone.Classes.Remove("over");
diff --git a/src/Filee.App/Views/Pages/ThemePage.axaml b/src/Filee.App/Views/Pages/ThemePage.axaml
index 09d64753..13c3ea08 100644
--- a/src/Filee.App/Views/Pages/ThemePage.axaml
+++ b/src/Filee.App/Views/Pages/ThemePage.axaml
@@ -49,7 +49,7 @@
<Setter Property="LineHeight" Value="17" />
</Style>
<Style Selector="Button.preset-pill">
- <Setter Property="CornerRadius" Value="999" />
+ <Setter Property="CornerRadius" Value="{DynamicResource SoftRadiusPill}" />
<Setter Property="Padding" Value="10,6" />
<Setter Property="Background" Value="{DynamicResource SurfaceBrush}" />
<Setter Property="BorderBrush" Value="{DynamicResource SubtleBorderBrush}" />
@@ -70,6 +70,16 @@
<Style Selector="Button.preset-pill:pressed">
<Setter Property="RenderTransform" Value="scale(0.96)" />
</Style>
+ <Style Selector=":is(TopLevel).reduced-motion Button.choice-card,
+ :is(TopLevel).reduced-motion Button.preset-pill">
+ <Setter Property="Transitions" Value="{x:Null}" />
+ <Setter Property="RenderTransform" Value="none" />
+ </Style>
+ <Style Selector=":is(TopLevel).reduced-motion Button.choice-card:pointerover,
+ :is(TopLevel).reduced-motion Button.preset-pill:pointerover,
+ :is(TopLevel).reduced-motion Button.preset-pill:pressed">
+ <Setter Property="RenderTransform" Value="none" />
+ </Style>
</UserControl.Styles>
<Grid ColumnDefinitions="*,20,340" RowDefinitions="Auto,*">
@@ -80,9 +90,9 @@
<Border Classes="card">
<StackPanel Spacing="12">
<DockPanel>
- <Border DockPanel.Dock="Right" CornerRadius="999" Background="{DynamicResource AccentSoftBrush}" Padding="8,2"
+ <Border DockPanel.Dock="Right" CornerRadius="{DynamicResource SoftRadiusPill}" Background="{DynamicResource AccentSoftBrush}" Padding="8,2"
IsVisible="{Binding IsMaterialYou}">
- <TextBlock Text="Material 3" FontSize="11" FontWeight="SemiBold" Foreground="{DynamicResource AccentStrongBrush}" />
+ <TextBlock Text="{DynamicResource theme.style.m3_badge}" FontSize="11" FontWeight="SemiBold" Foreground="{DynamicResource AccentStrongBrush}" />
</Border>
<TextBlock Classes="label" Text="{DynamicResource theme.style}" VerticalAlignment="Center" Margin="0" />
</DockPanel>
@@ -110,8 +120,8 @@
<StackPanel Spacing="6" VerticalAlignment="Top">
<StackPanel Orientation="Horizontal" Spacing="6" VerticalAlignment="Center">
<TextBlock Classes="choice-title" Text="{DynamicResource theme.style.MaterialYou}" />
- <Border CornerRadius="999" Background="{DynamicResource AccentBrush}" Padding="6,1">
- <TextBlock Text="M3" FontSize="10" FontWeight="Bold" Foreground="{DynamicResource OnAccentBrush}" />
+ <Border CornerRadius="{DynamicResource SoftRadiusPill}" Background="{DynamicResource AccentBrush}" Padding="6,1">
+ <TextBlock Text="{DynamicResource theme.style.m3_tag}" FontSize="10" FontWeight="Bold" Foreground="{DynamicResource OnAccentBrush}" />
</Border>
</StackPanel>
<TextBlock Classes="choice-desc" Text="{DynamicResource theme.style.material_you_hint}" TextWrapping="Wrap" />
@@ -145,7 +155,7 @@
<Setter Property="Margin" Value="0,0,4,4" />
<Setter Property="Template">
<ControlTemplate>
- <Border x:Name="SelectionRing" CornerRadius="999" BorderThickness="2" BorderBrush="Transparent" Padding="3">
+ <Border x:Name="SelectionRing" CornerRadius="{DynamicResource SoftRadiusPill}" BorderThickness="2" BorderBrush="Transparent" Padding="3">
<ContentPresenter Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}" />
</Border>
</ControlTemplate>
@@ -165,7 +175,7 @@
</ListBox.ItemsPanel>
<ListBox.ItemTemplate>
<DataTemplate x:DataType="Color">
- <Border Width="34" Height="34" CornerRadius="999" ToolTip.Tip="{Binding}" AutomationProperties.Name="{Binding}">
+ <Border Width="34" Height="34" CornerRadius="{DynamicResource SoftRadiusPill}" ToolTip.Tip="{Binding}" AutomationProperties.Name="{Binding}">
<Border.Background>
<SolidColorBrush Color="{Binding}" />
</Border.Background>
@@ -203,7 +213,7 @@
Command="{Binding $parent[ItemsControl].((vm:ThemePageViewModel)DataContext).PickPresetCommand}"
CommandParameter="{Binding}">
<DockPanel>
- <Border DockPanel.Dock="Left" Width="18" Height="18" CornerRadius="999" Margin="0,0,8,0"
+ <Border DockPanel.Dock="Left" Width="18" Height="18" CornerRadius="{DynamicResource SoftRadiusPill}" Margin="0,0,8,0"
BorderBrush="{DynamicResource SubtleBorderBrush}" BorderThickness="1">
<Border.Background>
<SolidColorBrush Color="{Binding Color}" />
diff --git a/src/Filee.Core/Platform/IPlatformServices.cs b/src/Filee.Core/Platform/IPlatformServices.cs
index e044cbf2..ebb8d640 100644
--- a/src/Filee.Core/Platform/IPlatformServices.cs
+++ b/src/Filee.Core/Platform/IPlatformServices.cs
@@ -174,15 +174,9 @@ public sealed class NullPlatformServices : IPlatformServices
private static void Open(string path)
{
- if (OperatingSystem.IsWindows())
- {
- var start = new System.Diagnostics.ProcessStartInfo(Path.GetFullPath(path)) { UseShellExecute = true };
- System.Diagnostics.Process.Start(start)?.Dispose();
- return;
- }
var opener = OperatingSystem.IsMacOS() ? "open" : "xdg-open";
- var startUnix = new System.Diagnostics.ProcessStartInfo(opener) { UseShellExecute = false };
- startUnix.ArgumentList.Add(path);
- System.Diagnostics.Process.Start(startUnix)?.Dispose();
+ var start = new System.Diagnostics.ProcessStartInfo(opener) { UseShellExecute = false };
+ start.ArgumentList.Add(path);
+ System.Diagnostics.Process.Start(start)?.Dispose();
}
}
diff --git a/src/Filee.Core/Settings/AppSettings.cs b/src/Filee.Core/Settings/AppSettings.cs
index 5813d4f5..03a98f9d 100644
--- a/src/Filee.Core/Settings/AppSettings.cs
+++ b/src/Filee.Core/Settings/AppSettings.cs
@@ -42,6 +42,9 @@ public sealed class ThemeSettings
/// <summary>Accent colour as <c>#RRGGBB</c>.</summary>
public string Accent { get; set; } = "#7F77DD";
+ /// <summary>Active curated preset key (e.g. "mint", "peach") when a coordinated light/dark pair is used; null for custom choices.</summary>
+ public string? PresetKey { get; set; }
+
/// <summary>Base corner radius in pixels. Larger = "softer" UI.</summary>
public double CornerRadius { get; set; } = 16;
diff --git a/src/Filee.Engines/Filee.Engines.csproj b/src/Filee.Engines/Filee.Engines.csproj
index ca144acd..a0219929 100644
--- a/src/Filee.Engines/Filee.Engines.csproj
+++ b/src/Filee.Engines/Filee.Engines.csproj
@@ -38,7 +38,6 @@
<ItemGroup>
<InternalsVisibleTo Include="Filee" />
<InternalsVisibleTo Include="Filee.Engines.Tests" />
- <InternalsVisibleTo Include="Filee.App.Tests" />
</ItemGroup>
<ItemGroup>
diff --git a/tests/Filee.App.Tests/MaterialYouThemeTests.cs b/tests/Filee.App.Tests/MaterialYouThemeTests.cs
index 85bdbc7e..a627cd21 100644
--- a/tests/Filee.App.Tests/MaterialYouThemeTests.cs
+++ b/tests/Filee.App.Tests/MaterialYouThemeTests.cs
@@ -228,12 +228,139 @@ public class MaterialYouThemeTests
// Switch preset
var preset = vm.PastelPresets.First(p => p.Key == "lavender");
vm.PickPresetCommand.Execute(preset);
+ Assert.Equal("lavender", store.Settings.Theme.PresetKey);
Assert.Equal(preset.Color, vm.Accent);
Assert.Equal(store.Settings.Theme.Accent, vm.AccentHex);
+
+ // Picking a custom swatch clears PresetKey
+ vm.PickSwatchCommand.Execute(Colors.Teal);
+ Assert.Null(store.Settings.Theme.PresetKey);
+ Assert.Equal(Colors.Teal, vm.Accent);
}
finally
{
Directory.Delete(directory, true);
}
}
+
+ [AvaloniaFact]
+ public void Controls_resolve_MaterialYou_dark_accent_roles_at_runtime_without_top_level_shadowing()
+ {
+ TestServices.EnsureInitialized("en");
+ var themeService = AppHost.Get<ThemeService>();
+ var seed = Color.Parse("#7F77DD");
+
+ try
+ {
+ themeService.Apply(new ThemeSettings { Style = ThemeStyle.MaterialYou, Accent = "#7F77DD" }, "en");
+
+ var darkWindow = new Window();
+ var found = darkWindow.TryFindResource("AccentStrongBrush", ThemeVariant.Dark, out var strongResource);
+ Assert.True(found, "TryFindResource AccentStrongBrush failed");
+ var strongBrush = Assert.IsType<SolidColorBrush>(strongResource);
+
+ var foundSoft = darkWindow.TryFindResource("AccentSoftBrush", ThemeVariant.Dark, out var softResource);
+ Assert.True(foundSoft, "TryFindResource AccentSoftBrush failed");
+ var softBrush = Assert.IsType<SolidColorBrush>(softResource);
+
+ // Old SoftPalette.ApplyAccent wrote Shade(#7F77DD, -0.25) which is #5F59A6 (luminance ~0.11)
+ var oldShadowedColor = SoftPalette.Shade(seed, -0.25);
+ Assert.NotEqual(oldShadowedColor, strongBrush.Color);
+
+ // Material You Dark AccentStrong is onPrimaryContainer (bright foreground, luminance > 0.65)
+ Assert.True(MaterialYouPalette.Luminance(strongBrush.Color) > 0.65,
+ $"Expected bright AccentStrongBrush in dark mode, got luminance {MaterialYouPalette.Luminance(strongBrush.Color)}");
+
+ // Material You Dark AccentSoft is primaryContainer (opaque tonal background, not 18% alpha)
+ Assert.Equal(255, softBrush.Color.A);
+ Assert.True(MaterialYouPalette.Luminance(softBrush.Color) < 0.35);
+ }
+ finally
+ {
+ themeService.Apply(new ThemeSettings(), "en");
+ }
+ }
+
+ [AvaloniaFact]
+ public void Controls_resolve_monochrome_contrast_in_dark_mode()
+ {
+ TestServices.EnsureInitialized("en");
+ var themeService = AppHost.Get<ThemeService>();
+
+ try
+ {
+ // Apply monochrome in both Soft and Material You styles
+ foreach (var style in new[] { ThemeStyle.Soft, ThemeStyle.MaterialYou })
+ {
+ themeService.Apply(new ThemeSettings { Style = style, Accent = "#1F1E1D", PresetKey = "monochrome" }, "en");
+
+ var accentBrush = ResolveBrush("AccentBrush", ThemeVariant.Dark);
+ var onAccentBrush = ResolveBrush("OnAccentBrush", ThemeVariant.Dark);
+
+ // In dark mode, monochrome accent must resolve to silvery white (#F1EFE8), NOT dark charcoal (#1F1E1D)
+ Assert.True(MaterialYouPalette.Luminance(accentBrush.Color) > 0.80,
+ $"{style}: Expected silvery white in dark mode, got {accentBrush.Color}");
+ Assert.True(MaterialYouPalette.Luminance(onAccentBrush.Color) < 0.20,
+ $"{style}: Expected dark text on accent in dark mode, got {onAccentBrush.Color}");
+
+ var lightAccentBrush = ResolveBrush("AccentBrush", ThemeVariant.Light);
+ var lightOnAccentBrush = ResolveBrush("OnAccentBrush", ThemeVariant.Light);
+
+ // In light mode, monochrome accent must resolve to dark charcoal (#1F1E1D)
+ Assert.True(MaterialYouPalette.Luminance(lightAccentBrush.Color) < 0.20,
+ $"{style}: Expected dark charcoal in light mode, got {lightAccentBrush.Color}");
+ Assert.Equal(Colors.White, lightOnAccentBrush.Color);
+ }
+ }
+ finally
+ {
+ themeService.Apply(new ThemeSettings(), "en");
+ }
+ }
+
+ [AvaloniaFact]
+ public void Preset_pair_switches_between_light_and_dark_under_system_mode()
+ {
+ TestServices.EnsureInitialized("en");
+ var themeService = AppHost.Get<ThemeService>();
+
+ try
+ {
+ // Apply mint preset under System mode
+ themeService.Apply(new ThemeSettings { Mode = ThemeMode.System, PresetKey = "mint" }, "en");
+
+ var lightBrush = ResolveBrush("AccentBrush", ThemeVariant.Light);
+ var darkBrush = ResolveBrush("AccentBrush", ThemeVariant.Dark);
+
+ var mintPreset = ThemeService.Presets.First(p => p.Key == "mint");
+ Assert.Equal(mintPreset.LightColor, lightBrush.Color);
+ Assert.Equal(mintPreset.DarkColor, darkBrush.Color);
+ }
+ finally
+ {
+ themeService.Apply(new ThemeSettings(), "en");
+ }
+ }
+
+ private static SolidColorBrush ResolveBrush(string key, ThemeVariant variant)
+ {
+ var window = new Window();
+ Assert.True(window.TryFindResource(key, variant, out var value), $"Failed to resolve resource {key} for variant {variant}");
+ return Assert.IsType<SolidColorBrush>(value);
+ }
+
+ [AvaloniaFact]
+ public void Softness_derives_SoftRadiusPill_consistently()
+ {
+ TestServices.EnsureInitialized("en");
+ var app = Application.Current!;
+
+ // Softness = 0 (sharp corners) -> SoftRadiusPill is 0
+ SoftPalette.ApplyCornerRadius(app.Resources, 0);
+ Assert.Equal(0, ((CornerRadius)app.Resources["SoftRadiusPill"]!).TopLeft);
+
+ // Softness = 16 (default) -> SoftRadiusPill is round(16 * 2.5) = 40
+ SoftPalette.ApplyCornerRadius(app.Resources, 16);
+ Assert.Equal(40, ((CornerRadius)app.Resources["SoftRadiusPill"]!).TopLeft);
+ }
}
diff --git a/tests/Filee.App.Tests/RecentConversionTests.cs b/tests/Filee.App.Tests/RecentConversionTests.cs
index 51256ffd..2cad57ef 100644
--- a/tests/Filee.App.Tests/RecentConversionTests.cs
+++ b/tests/Filee.App.Tests/RecentConversionTests.cs
@@ -94,20 +94,8 @@ public class RecentConversionTests
File.WriteAllBytes(broken, [0x89, 0x50, 0x4E, 0x47, 1, 2, 3]);
Assert.Null(HistoryThumbnails.Load(broken));
- var brokenVideo = Path.Combine(folder, "broken.mp4");
- File.WriteAllBytes(brokenVideo, [0, 0, 0, 0x18, 0x66, 0x74, 0x79, 0x70]);
- Assert.Null(HistoryThumbnails.Load(brokenVideo));
-
Assert.True(HistoryThumbnails.CanShow(@"C:\a\photo.JPG"));
- Assert.True(HistoryThumbnails.CanShow(@"C:\a\clip.mp4"));
- Assert.True(HistoryThumbnails.CanShow(@"C:\a\movie.MKV"));
- Assert.True(HistoryThumbnails.CanShow(@"C:\a\sample.webm"));
- Assert.True(HistoryThumbnails.CanShow(@"C:\a\phone.MOV"));
- Assert.True(HistoryThumbnails.CanShow(@"C:\a\report.pdf"));
- Assert.True(HistoryThumbnails.CanShow(@"C:\a\document.docx"));
- Assert.True(HistoryThumbnails.CanShow(@"C:\a\notes.txt"));
- Assert.True(HistoryThumbnails.CanShow(@"C:\a\config.json"));
- Assert.False(HistoryThumbnails.CanShow(@"C:\a\archive.zip"));
+ Assert.False(HistoryThumbnails.CanShow(@"C:\a\report.pdf"));
Assert.False(HistoryThumbnails.CanShow(@"C:\a\folder"));
}
finally
@@ -116,88 +104,6 @@ public class RecentConversionTests
}
}
- [AvaloniaFact]
- public void A_video_generates_a_thumbnail_when_ffmpeg_is_available()
- {
- var tools = Filee.Engines.Media.FfmpegConverter.Locate();
- if (tools is null)
- return;
-
- var folder = Directory.CreateTempSubdirectory("filee-videothumbs-").FullName;
- try
- {
- var video = Path.Combine(folder, "sample.mp4");
- // Create a short 2-second video with FFmpeg
- var psi = new System.Diagnostics.ProcessStartInfo(tools.Value.Ffmpeg)
- {
- UseShellExecute = false,
- CreateNoWindow = true,
- };
- psi.ArgumentList.Add("-hide_banner");
- psi.ArgumentList.Add("-nostdin");
- psi.ArgumentList.Add("-v");
- psi.ArgumentList.Add("error");
- psi.ArgumentList.Add("-y");
- psi.ArgumentList.Add("-f");
- psi.ArgumentList.Add("lavfi");
- psi.ArgumentList.Add("-i");
- psi.ArgumentList.Add("testsrc=duration=2:size=320x240:rate=10");
- psi.ArgumentList.Add("-pix_fmt");
- psi.ArgumentList.Add("yuv420p");
- psi.ArgumentList.Add(video);
-
- using var process = System.Diagnostics.Process.Start(psi);
- Assert.NotNull(process);
- Assert.True(process.WaitForExit(20_000));
- if (process.ExitCode != 0 || !File.Exists(video))
- return;
-
- var thumbnail = HistoryThumbnails.Load(video);
- if (thumbnail is null)
- return;
- Assert.Equal(new PixelSize(HistoryThumbnails.Size, HistoryThumbnails.Size), thumbnail.PixelSize);
- Assert.Same(thumbnail, HistoryThumbnails.Cached(video));
- }
- finally
- {
- Directory.Delete(folder, true);
- }
- }
-
- [AvaloniaFact]
- public void A_document_and_text_file_generate_thumbnails()
- {
- var folder = Directory.CreateTempSubdirectory("filee-docthumbs-").FullName;
- try
- {
- // Text file
- var textFile = Path.Combine(folder, "notes.txt");
- File.WriteAllText(textFile, "Project Overview\n==============\nFirst lines of converted text here.");
- var textThumb = HistoryThumbnails.Load(textFile);
- Assert.NotNull(textThumb);
- Assert.Equal(new PixelSize(HistoryThumbnails.Size, HistoryThumbnails.Size), textThumb.PixelSize);
- Assert.Same(textThumb, HistoryThumbnails.Cached(textFile));
-
- // DOCX file with word/document.xml
- var docxFile = Path.Combine(folder, "document.docx");
- using (var zipStream = new FileStream(docxFile, FileMode.Create))
- using (var archive = new System.IO.Compression.ZipArchive(zipStream, System.IO.Compression.ZipArchiveMode.Create))
- {
- var entry = archive.CreateEntry("word/document.xml");
- using var writer = new StreamWriter(entry.Open());
- writer.Write("<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?><w:document xmlns:w=\"http://schemas.openxmlformats.org/wordprocessingml/2006/main\"><w:body><w:p><w:r><w:t>Quarterly Financial Results and Summary</w:t></w:r></w:p></w:body></w:document>");
- }
- var docxThumb = HistoryThumbnails.Load(docxFile);
- Assert.NotNull(docxThumb);
- Assert.Equal(new PixelSize(HistoryThumbnails.Size, HistoryThumbnails.Size), docxThumb.PixelSize);
- Assert.Same(docxThumb, HistoryThumbnails.Cached(docxFile));
- }
- finally
- {
- Directory.Delete(folder, true);
- }
- }
-
[AvaloniaTheory]
[InlineData(true)]
[InlineData(false)]