From 048778dd865388dcdf20898e1ea7057824307f59 Mon Sep 17 00:00:00 2001 From: Nerixyz Date: Sat, 3 Dec 2022 14:01:07 +0100 Subject: [PATCH] fix: limit path to 50 characters --- src/widgets/settingspages/HighlightingPage.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/widgets/settingspages/HighlightingPage.cpp b/src/widgets/settingspages/HighlightingPage.cpp index d9a58018831..d9037eb78ef 100644 --- a/src/widgets/settingspages/HighlightingPage.cpp +++ b/src/widgets/settingspages/HighlightingPage.cpp @@ -7,6 +7,7 @@ #include "controllers/highlights/UserHighlightModel.hpp" #include "singletons/Settings.hpp" #include "singletons/Theme.hpp" +#include "util/Helpers.hpp" #include "util/LayoutCreator.hpp" #include "util/StandardItemHelper.hpp" #include "widgets/dialogs/BadgePickerDialog.hpp" @@ -251,7 +252,8 @@ HighlightingPage::HighlightingPage() auto url = QUrl::fromLocalFile(value); return QString("Default sound: %2") - .arg(url.toString(QUrl::FullyEncoded), url.fileName()); + .arg(url.toString(QUrl::FullyEncoded), + shortenString(url.fileName(), 50)); }, getSettings()->pathHighlightSound)); label->setToolTip(