!4 fix File name is obscured when it's too long in detail page
From: @tanyulong2021 Reviewed-by: @dou33 Signed-off-by: @dou33
This commit is contained in:
commit
ac72b09bf0
@ -0,0 +1,34 @@
|
||||
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
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
|
||||
Name: ukui-search
|
||||
Version: 0.4.1
|
||||
Release: 3
|
||||
Release: 4
|
||||
Summary: Advanced ukui menu
|
||||
License: GPL-3.0
|
||||
URL: http://www.ukui.org
|
||||
@ -10,6 +10,7 @@ Source0: %{name}-%{version}.tar.gz
|
||||
|
||||
Patch0: 0001-Update-changelog.patch
|
||||
Patch1: 0002-fix-Index-crash-when-meet-encrypt-doc-files.patch
|
||||
Patch2: 0003-File-name-is-obscured-when-it-s-too-long-in-detail-page.patch
|
||||
|
||||
BuildRequires: pkgconf
|
||||
BuildRequires: gsettings-qt-devel
|
||||
@ -86,6 +87,7 @@ permanent.
|
||||
%setup -q
|
||||
%patch0 -p1
|
||||
%patch1 -p1
|
||||
%patch2 -p1
|
||||
|
||||
%build
|
||||
mkdir build && cd build
|
||||
@ -137,11 +139,14 @@ rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
|
||||
%changelog
|
||||
* Mon Nov 1 2021 tanyulong <tanyulong@kylinos.cn> - 0.4.1-4
|
||||
- fix File name is obscured when it's too long in detail page
|
||||
|
||||
* Fri Oct 29 2021 tanyulong <tanyulong@kylinos.cn> - 0.4.1-3
|
||||
- fix Index crash when meet encrypt doc files
|
||||
|
||||
* Wed Oct 27 2021 tanyulong <tanyulong@kylin0s.cn> - 0.4.1-2
|
||||
- Update changelog
|
||||
- Update changelog
|
||||
|
||||
* Mon Oct 25 2021 tanyulong <tanyulong@kylinos.cn> - 0.4.1-1
|
||||
- Init package for openEuler
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user