From e34f0ac05c5003c61f3d9b6c414a02e0138cd728 Mon Sep 17 00:00:00 2001 From: Leon Styhre <leon@leonstyhre.com> Date: Fri, 28 Jul 2023 23:05:41 +0200 Subject: [PATCH] When editing custom collections with really long names, the 'Y' helpsystem text now gets abbreviated --- es-app/src/views/GamelistView.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/es-app/src/views/GamelistView.cpp b/es-app/src/views/GamelistView.cpp index 7a06df93b..4f3216ebc 100644 --- a/es-app/src/views/GamelistView.cpp +++ b/es-app/src/views/GamelistView.cpp @@ -474,13 +474,17 @@ std::vector<HelpPrompt> GamelistView::getHelpPrompts() !UIModeController::getInstance()->isUIModeKiosk() && (Settings::getInstance()->getBool("FavoritesAddButton") || CollectionSystemsManager::getInstance()->isEditing())) { - std::string prompt = CollectionSystemsManager::getInstance()->getEditingCollection(); + std::string prompt {CollectionSystemsManager::getInstance()->getEditingCollection()}; + if (prompt.length() > 24) + prompt = prompt.substr(0, 22) + "..."; prompts.push_back(HelpPrompt("y", prompt)); } else if (mRoot->getSystem()->isGameSystem() && mRoot->getSystem()->getThemeFolder() == "custom-collections" && CollectionSystemsManager::getInstance()->isEditing()) { - std::string prompt = CollectionSystemsManager::getInstance()->getEditingCollection(); + std::string prompt {CollectionSystemsManager::getInstance()->getEditingCollection()}; + if (prompt.length() > 24) + prompt = prompt.substr(0, 22) + "..."; prompts.push_back(HelpPrompt("y", prompt)); } return prompts;