!14 prompt optimization

From: @hou-hongxun 
Reviewed-by: @peijiankang 
Signed-off-by: @peijiankang
This commit is contained in:
openeuler-ci-bot 2024-05-08 06:17:47 +00:00 committed by Gitee
commit 6ae1eefd48
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 84 additions and 1 deletions

View File

@ -0,0 +1,78 @@
From 33ce1bd8026bad18a0a4022793ada89d605eea43 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E4=BE=AF=E7=BA=A2=E5=8B=8B?= <houhongxun@kylinos.cn>
Date: Tue, 16 Apr 2024 09:35:04 +0800
Subject: [PATCH] kylin-photo-view: optimize prompt
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Signed-off-by: 侯红勋 <houhongxun@kylinos.cn>
---
src/view/openimage.cpp | 8 ++++----
src/view/sizedate.h | 4 ++--
translations/kylin-photo-viewer_zh_CN.ts | 4 ++--
3 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/src/view/openimage.cpp b/src/view/openimage.cpp
index 828bf95..54d227a 100644
--- a/src/view/openimage.cpp
+++ b/src/view/openimage.cpp
@@ -8,19 +8,19 @@ OpenImage::OpenImage(QWidget *parent) : QWidget(parent)
m_openInCenter = new QPushButton(this);
m_openInCenter->setFocusPolicy(Qt::NoFocus);
m_openInCenter->setFixedSize(OPENINCENTER_SIZE);
- m_openInCenter->move(0,0);
+ m_openInCenter->move(110,110);
m_ft.setPixelSize(14);
//中间“+”号按钮
m_addFile = new QPushButton(m_openInCenter);
m_addFile->setFocusPolicy(Qt::NoFocus);
m_addFile->setFixedSize(ADD_FILESIZE);
- m_addFile->move(m_openInCenter->geometry().center()-m_addFile->rect().center());
+ m_addFile->move(44, 44);
//按钮下的“打开图片”文字
m_openText = new QLabel(this);
- m_openText->setText(tr("Load picture"));
+ m_openText->setText(tr("Click or drag to load picture"));
m_openText->setFixedWidth(OPEN_IMAGEFIX);
m_openText->setAlignment(Qt::AlignCenter);
- m_openText->move(0,OPEN_IMAGEFIX+25);
+ m_openText->move(0,OPEN_IMAGEFIX - 80);
// m_openText->setFont(m_ft);
this->setFixedSize(OPEN_IMAGESIZE);
diff --git a/src/view/sizedate.h b/src/view/sizedate.h
index 164bd50..4a3ed1f 100644
--- a/src/view/sizedate.h
+++ b/src/view/sizedate.h
@@ -10,10 +10,10 @@ static const QSize LOGO_BTN = QSize(24,24);//标题栏logo按钮尺寸
static const QSize TITLE_BTN = QSize(30,30);//标题栏按钮尺寸
static const int BAR_HEIGHT = 40;//标题栏和工具栏的高度
static const QSize ICON_SIZE = QSize(30,30);//图标大小
-static const QSize OPEN_IMAGESIZE = QSize(128, 128 + 50 + 10);//打开图片界面尺寸
+static const QSize OPEN_IMAGESIZE = QSize(350, 350 + 50 + 10);//打开图片界面尺寸
static const QSize OPENINCENTER_SIZE = QSize(128, 128);//打开图片界面--中间打开圆形图标按钮尺寸
static const QSize ADD_FILESIZE = QSize(40, 40);//打开图片界面--中间打开加号图标按钮尺寸
-static const int OPEN_IMAGEFIX = 128;//打开图片界面的固定值
+static const int OPEN_IMAGEFIX = 350;//打开图片界面的固定值
static const QSize NAVI_SIZE = QSize(200, 40);//导航栏尺寸
static const QSize INFOR_SIZE = QSize(207 + 6,197 + 18 +20 + 8);//信息栏尺寸
static const QSize TOOLBAR_SIZE = QSize(479 +4 + 40 ,40 + 4);//工具栏尺寸
diff --git a/translations/kylin-photo-viewer_zh_CN.ts b/translations/kylin-photo-viewer_zh_CN.ts
index 125e3ed..15dfadb 100644
--- a/translations/kylin-photo-viewer_zh_CN.ts
+++ b/translations/kylin-photo-viewer_zh_CN.ts
@@ -111,8 +111,8 @@
<name>OpenImage</name>
<message>
<location filename="../src/view/openimage.cpp" line="20"/>
- <source>Load picture</source>
- <translation>载入图片</translation>
+ <source>Click or drag to load picture</source>
+ <translation>点击或拖拽载入图片</translation>
</message>
<message>
<location filename="../src/view/openimage.cpp" line="93"/>
--
2.43.0

View File

@ -1,11 +1,12 @@
Name: kylin-photo-viewer
Version: 1.2.0
Release: 2
Release: 3
Summary: kylin-photo-viewer
License: BSL-1.0 and Libpng and zlib and GPL-2.0-or-later
URL: https://github.com/UbuntuKylin/kylin-photo-viewer
Source0: %{name}-%{version}.tar.gz
Patch01: 0001-fix-compile-error-of-kylin-photo-viewer.patch
Patch02: 0001-kylin-photo-view-optimize-prompt.patch
BuildRequires: qt5-qtbase-devel
BuildRequires: qtchooser
@ -30,6 +31,7 @@ Photo viewer, support to view, zoom and rotate images of various formats
%prep
%setup -q
%patch01 -p1
%patch02 -p1
%build
export PATH=%{_qt5_bindir}:$PATH
@ -72,6 +74,9 @@ glib-compile-schemas /usr/share/glib-2.0/schemas &> /dev/null ||:
%{_datadir}/kylin-user-guide/data/guide/
%changelog
* Tue Apr 16 2024 houhongxun <houhongxun@kylinos.cn> - 1.2.0-3
- prompt optimization
* Wed Feb 1 2023 peijiankang <peijiankang@kylinos.cn> - 1.2.0-2
- add build debuginfo and debugsource