- #1038 (partial): Add .erase() for consumed words in layoutAndExtractLines to fix redundant early flush bug; fix wordContinues flag in hyphenateWordAtIndex - #1037: Add combining mark handling for hyphenation (NFC-like precomposition) and rendering (base glyph tracking in EpdFont, GfxRenderer including CCW) - #1045: Shorten STR_FORGET_BUTTON labels across all 9 translation files - #1019: Display file extensions in File Browser via getFileExtension helper - Pull romanian.yaml from upstream/master (merged PR #987) Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -196,6 +196,15 @@ std::string getFileName(std::string filename) {
|
||||
return filename.substr(0, pos);
|
||||
}
|
||||
|
||||
std::string getFileExtension(std::string filename) {
|
||||
if (filename.back() == '/') {
|
||||
return "";
|
||||
}
|
||||
const auto pos = filename.rfind('.');
|
||||
if (pos == std::string::npos) return "";
|
||||
return filename.substr(pos);
|
||||
}
|
||||
|
||||
void MyLibraryActivity::render(Activity::RenderLock&&) {
|
||||
renderer.clearScreen();
|
||||
|
||||
@@ -214,7 +223,8 @@ void MyLibraryActivity::render(Activity::RenderLock&&) {
|
||||
GUI.drawList(
|
||||
renderer, Rect{0, contentTop, pageWidth, contentHeight}, files.size(), selectorIndex,
|
||||
[this](int index) { return getFileName(files[index]); }, nullptr,
|
||||
[this](int index) { return UITheme::getFileIcon(files[index]); });
|
||||
[this](int index) { return UITheme::getFileIcon(files[index]); },
|
||||
[this](int index) { return getFileExtension(files[index]); }, false);
|
||||
}
|
||||
|
||||
// Help text
|
||||
|
||||
Reference in New Issue
Block a user