From b48dffa38dad136711adc5df996233bf831626aa Mon Sep 17 00:00:00 2001 From: jpirnay Date: Wed, 25 Mar 2026 01:47:42 +0100 Subject: [PATCH 1/3] feat: Make directories stand out more in local file browser: "[dir]" instead of "dir" (#1339) ## Summary * **What is the goal of this PR?** It's difficult to distinguish directory names from normal file entries, so they are displayed now as "[dir]" instead of "dir" for classic theme * **What changes are included?** ## Additional Context * Add any other information that might be helpful for the reviewer (e.g., performance implications, potential risks, specific areas to focus on). --- ### AI Usage While CrossPoint doesn't have restrictions on AI tools in contributing, please be transparent about their usage as it helps set the right context for reviewers. Did you use AI tools to help write this code? _**NO**_ --- src/activities/home/FileBrowserActivity.cpp | 6 +++++- src/components/themes/BaseTheme.h | 1 + src/components/themes/lyra/LyraTheme.h | 1 + 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/activities/home/FileBrowserActivity.cpp b/src/activities/home/FileBrowserActivity.cpp index b47efc6c..3b14031b 100644 --- a/src/activities/home/FileBrowserActivity.cpp +++ b/src/activities/home/FileBrowserActivity.cpp @@ -239,7 +239,11 @@ void FileBrowserActivity::loop() { std::string getFileName(std::string filename) { if (filename.back() == '/') { - return filename.substr(0, filename.length() - 1); + filename.pop_back(); + if (!UITheme::getInstance().getTheme().showsFileIcons()) { + return "[" + filename + "]"; + } + return filename; } const auto pos = filename.rfind('.'); return filename.substr(0, pos); diff --git a/src/components/themes/BaseTheme.h b/src/components/themes/BaseTheme.h index 212f6e82..6878f555 100644 --- a/src/components/themes/BaseTheme.h +++ b/src/components/themes/BaseTheme.h @@ -141,4 +141,5 @@ class BaseTheme { virtual void drawHelpText(const GfxRenderer& renderer, Rect rect, const char* label) const; virtual void drawTextField(const GfxRenderer& renderer, Rect rect, const int textWidth) const; virtual void drawKeyboardKey(const GfxRenderer& renderer, Rect rect, const char* label, const bool isSelected) const; + virtual bool showsFileIcons() const { return false; } }; diff --git a/src/components/themes/lyra/LyraTheme.h b/src/components/themes/lyra/LyraTheme.h index 1e953a81..4e20390e 100644 --- a/src/components/themes/lyra/LyraTheme.h +++ b/src/components/themes/lyra/LyraTheme.h @@ -68,4 +68,5 @@ class LyraTheme : public BaseTheme { void fillPopupProgress(const GfxRenderer& renderer, const Rect& layout, const int progress) const override; void drawTextField(const GfxRenderer& renderer, Rect rect, const int textWidth) const override; void drawKeyboardKey(const GfxRenderer& renderer, Rect rect, const char* label, const bool isSelected) const override; + bool showsFileIcons() const override { return true; } }; From 4ca447edcb9ee617b09951c3ffb83a59b348f81c Mon Sep 17 00:00:00 2001 From: Dani Poveda Date: Wed, 25 Mar 2026 07:25:55 +0100 Subject: [PATCH 2/3] chore: Spanish localization for STR_SHOW_HIDDEN_FILES (#1486) ## Summary * Adding Spanish translation for string `STR_SHOW_HIDDEN_FILES` --- ### AI Usage While CrossPoint doesn't have restrictions on AI tools in contributing, please be transparent about their usage as it helps set the right context for reviewers. Did you use AI tools to help write this code? _**NO**_ --- lib/I18n/translations/spanish.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/I18n/translations/spanish.yaml b/lib/I18n/translations/spanish.yaml index 64f8380e..d4b2ad14 100644 --- a/lib/I18n/translations/spanish.yaml +++ b/lib/I18n/translations/spanish.yaml @@ -81,6 +81,7 @@ STR_SCREEN_MARGIN: "Margen de lectura" STR_PARA_ALIGNMENT: "Ajuste de párrafo" STR_HYPHENATION: "División de palabras" STR_TIME_TO_SLEEP: "Auto suspensión" +STR_SHOW_HIDDEN_FILES: "Mostrar archivos ocultos" STR_REFRESH_FREQ: "Frecuencia de refresco" STR_KOREADER_SYNC: "Sincronización de KOReader" STR_CHECK_UPDATES: "Verificar actualizaciones" From 1b00fe5a9af9d3cba4961ea011d5fb21c91c6ffa Mon Sep 17 00:00:00 2001 From: Baris Albayrak <80099286+barbarhan@users.noreply.github.com> Date: Wed, 25 Mar 2026 17:29:03 +1100 Subject: [PATCH 3/3] chore: Turkish localization for STR_SHOW_HIDDEN_FILES (#1487) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Adds the missing Turkish translation for STR_SHOW_HIDDEN_FILES in lib/I18n/translations/turkish.yaml. - Added: STR_SHOW_HIDDEN_FILES: "Gizli Dosyaları Göster" - Scope: Turkish only (single-key micro-fix) This follows up the missing-translations callout in #1483. Co-authored-by: Barış Albayrak --- lib/I18n/translations/turkish.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/I18n/translations/turkish.yaml b/lib/I18n/translations/turkish.yaml index bef07f82..0c6aa1a8 100644 --- a/lib/I18n/translations/turkish.yaml +++ b/lib/I18n/translations/turkish.yaml @@ -76,6 +76,7 @@ STR_SCREEN_MARGIN: "Okuyucu Ekran Kenar Boşluğu" STR_PARA_ALIGNMENT: "Okuyucu Paragraf Hizalaması" STR_HYPHENATION: "Hecelerden Ayırma" STR_TIME_TO_SLEEP: "Uykuya Geçme Süresi" +STR_SHOW_HIDDEN_FILES: "Gizli Dosyaları Göster" STR_REFRESH_FREQ: "Yenileme Sıklığı" STR_KOREADER_SYNC: "KOReader Senkronizasyonu" STR_CHECK_UPDATES: "Güncellemeleri denetle"