From c3f9d1a9197f25df90267917cc45f3224f5f0721 Mon Sep 17 00:00:00 2001
From: tanyulong <tanyulong@kylinos.cn>
Date: Mon, 1 Nov 2021 14:01:30 +0800
Subject: [PATCH] File name is obscured when it's too long in detail page

---
 src/control/search-detail-view.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/control/search-detail-view.cpp b/src/control/search-detail-view.cpp
index 8865e81..f791188 100644
--- a/src/control/search-detail-view.cpp
+++ b/src/control/search-detail-view.cpp
@@ -216,7 +216,7 @@ void SearchDetailView::setAppWidget(const QString &appname, const QString &path,
     m_optionView->show();
 
     QFontMetrics fontMetrics = m_nameLabel->fontMetrics();
-    QString showname = fontMetrics.elidedText(m_name, Qt::ElideRight, 274); //当字体长度超过215时显示为省略号
+    QString showname = fontMetrics.elidedText(m_name, Qt::ElideRight, 200); //当字体长度超过200时显示为省略号
 //    m_nameLabel->setText(showname);
     m_nameLabel->setText(QString("<h3 style=\"font-weight:normal;\">%1</h3>").arg(escapeHtml(showname)));
     if(QString::compare(showname, m_name)) {
@@ -351,7 +351,7 @@ void SearchDetailView::setupWidget(const int& type, const QString& path) {
         setIcon(path);
         QFontMetrics fontMetrics = m_nameLabel->fontMetrics();
         QString wholeName = FileUtils::getFileName(path);
-        QString name = fontMetrics.elidedText(wholeName, Qt::ElideRight, 274);
+        QString name = fontMetrics.elidedText(wholeName, Qt::ElideRight, 200);
 //        m_nameLabel->setText(name);
         m_nameLabel->setText(QString("<h3 style=\"font-weight:normal;\">%1</h3>").arg(escapeHtml(name)));
         if(QString::compare(name, wholeName)) {
-- 
2.30.0

