!34 rebuild 2.4.1

From: @liubuguiii 
Reviewed-by: @stonefly128 
Signed-off-by: @stonefly128
This commit is contained in:
openeuler-ci-bot 2023-09-06 06:20:57 +00:00 committed by Gitee
commit ec7d05c937
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
9 changed files with 5 additions and 2050 deletions

File diff suppressed because it is too large Load Diff

View File

@ -1,46 +0,0 @@
From d9b440c4fc2192084dd1cb531dd74f0063d8a9de Mon Sep 17 00:00:00 2001
From: liuxinhao <liuxinhao@kylinsec.com.cn>
Date: Thu, 1 Dec 2022 16:37:12 +0800
Subject: [PATCH 2/3] fix(KiranSiderbarWidget): If the text is too wide and too
long, it will be omitted
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
- 文本过宽过长超过分配空间大小的情况下,对文本进行省略
---
.../kiran-sidebar-widget/kiran-siderbar-delegate.cpp | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/src/widgets/kiran-sidebar-widget/kiran-siderbar-delegate.cpp b/src/widgets/kiran-sidebar-widget/kiran-siderbar-delegate.cpp
index f900fef..2ad8fbe 100644
--- a/src/widgets/kiran-sidebar-widget/kiran-siderbar-delegate.cpp
+++ b/src/widgets/kiran-sidebar-widget/kiran-siderbar-delegate.cpp
@@ -84,7 +84,9 @@ void KiranSiderbarDelegate::paint(QPainter *painter, const QStyleOptionViewItem
{
//将存储的数据根据locale转换
QString text = textForRole(Qt::DisplayRole, displayVar, option.locale);
- drawDisplay(painter, opt, textRect, text);
+ //处理文本过宽,超出分配的空间时,对文本进行省略
+ QString elideText = option.fontMetrics.elidedText(text, Qt::ElideRight, textRect.width(),Qt::TextShowMnemonic);
+ drawDisplay(painter, opt, textRect, elideText);
}
//status desc
@@ -265,6 +267,13 @@ void KiranSiderbarDelegate::doLayout(const QStyleOptionViewItem &option, const Q
int textSpaceX = pixmapSize.isEmpty() ? pixmapRectTemp.right() : pixmapRectTemp.right() + 10;
int textSpaceWidth = statusDescRectTemp.left() - (statusDescSize.isEmpty() ? 0 : 10) - textSpaceX;
QRect textRectTemp = QRect(textSpaceX, rect.y(), textSpaceWidth, rect.height());
+
+ //对TextSize进行限制,若文字大小超出了剩余的控空间大小,调整为剩余控件大小
+ if ( textSize.width() > textRectTemp.width() )
+ {
+ textSize.setWidth(textRectTemp.width());
+ }
+
textRect.setSize(textSize);
if (option.displayAlignment & Qt::AlignLeft)
{
--
2.33.0

View File

@ -1,31 +0,0 @@
From c158fb1f0616606f68fdd281a4632fb927065e1f Mon Sep 17 00:00:00 2001
From: liuxinhao <liuxinhao@kylinsec.com.cn>
Date: Thu, 1 Dec 2022 16:48:10 +0800
Subject: [PATCH 3/3] fix(KiranTitlebarWindow): Fix when zoomed
twice_GTK_FRAME_EXTENTS attribute needs to be updated
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
- 修复缩放两倍时_GTK_FRAME_EXTENTS属性需要更新的问题
---
.../kiran-titlebar-window/kiran-titlebar-window-private.cpp | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/widgets/kiran-titlebar-window/kiran-titlebar-window-private.cpp b/src/widgets/kiran-titlebar-window/kiran-titlebar-window-private.cpp
index b16871e..18a2aa3 100644
--- a/src/widgets/kiran-titlebar-window/kiran-titlebar-window-private.cpp
+++ b/src/widgets/kiran-titlebar-window/kiran-titlebar-window-private.cpp
@@ -548,7 +548,8 @@ bool KiranTitlebarWindowPrivate::eventFilter(QObject *obj, QEvent *event)
// 在接近显示时进行处理设置_GTK_FRAME_EXTENTS属性
if( m_isCompositingManagerRunning )
{
- XLibHelper::SetShadowWidth(QX11Info::display(),q_ptr->winId(),shadowWidth,shadowWidth,shadowWidth,shadowWidth);
+ int scaledShadowWidth = q_ptr->devicePixelRatio()*shadowWidth;
+ XLibHelper::SetShadowWidth(QX11Info::display(), q_ptr->winId(), scaledShadowWidth, scaledShadowWidth, scaledShadowWidth, scaledShadowWidth);
}
break;
case QEvent::HoverMove:
--
2.33.0

View File

@ -1,758 +0,0 @@
From 65b3dcd8af297fdf33419a5a3dd67a5001d3cf6c Mon Sep 17 00:00:00 2001
From: wangyucheng <wangyucheng@kylinsec.com.cn>
Date: Mon, 3 Apr 2023 10:53:30 +0800
Subject: [PATCH] fix(translate):add some translation
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
- 添加一些翻译
Relates #67661
---
CMakeLists.txt | 4 +-
translations/kiranwidgets-qt5.bo_CN.ts | 135 +++++++++++++++++++++++++
translations/kiranwidgets-qt5.kk_KG.ts | 135 +++++++++++++++++++++++++
translations/kiranwidgets-qt5.kk_KZ.ts | 135 +++++++++++++++++++++++++
translations/kiranwidgets-qt5.mn_MN.ts | 135 +++++++++++++++++++++++++
translations/kiranwidgets-qt5.ug_CN.ts | 135 +++++++++++++++++++++++++
6 files changed, 677 insertions(+), 2 deletions(-)
create mode 100644 translations/kiranwidgets-qt5.bo_CN.ts
create mode 100644 translations/kiranwidgets-qt5.kk_KG.ts
create mode 100644 translations/kiranwidgets-qt5.kk_KZ.ts
create mode 100644 translations/kiranwidgets-qt5.mn_MN.ts
create mode 100644 translations/kiranwidgets-qt5.ug_CN.ts
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 369bdea..8e81fd7 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -52,7 +52,7 @@ file(GLOB_RECURSE STYLE_H "src/kiran-style/*.h")
file(GLOB_RECURSE RESOURCES "resources/*.qrc")
#翻译
-set(TS_FILES "translations/kiranwidgets-qt5.zh_CN.ts")
+file(GLOB TS_FILES "translations/kiranwidgets-qt5.*.ts")
#开发头文件,需提供到devel包的文件
set(DEVEL_HEADER
@@ -148,4 +148,4 @@ endif()
if( build-tests )
add_subdirectory(test)
-endif()
\ No newline at end of file
+endif()
diff --git a/translations/kiranwidgets-qt5.bo_CN.ts b/translations/kiranwidgets-qt5.bo_CN.ts
new file mode 100644
index 0000000..836fbd0
--- /dev/null
+++ b/translations/kiranwidgets-qt5.bo_CN.ts
@@ -0,0 +1,135 @@
+<?xml version="1.0" ?><!DOCTYPE TS><TS version="2.1" language="zh_CN">
+<context>
+ <name>KiranTips</name>
+ <message>
+ <location filename="../src/widgets/kiran-tips/kiran-tips.ui" line="29"/>
+ <source>Form</source>
+ <translation type="unfinished">རྣམ་པ།</translation>
+ </message>
+</context>
+<context>
+ <name>QObject</name>
+ <message>
+ <location filename="../src/widgets/kiran-message-box/kiran-message-box-private.cpp" line="81"/>
+ <source>OK</source>
+ <translation>འགྲིགས།</translation>
+ </message>
+ <message>
+ <location filename="../src/widgets/kiran-message-box/kiran-message-box-private.cpp" line="82"/>
+ <source>Save</source>
+ <translation>གྲོན་ཆུང་བྱེད་དགོས།</translation>
+ </message>
+ <message>
+ <location filename="../src/widgets/kiran-message-box/kiran-message-box-private.cpp" line="83"/>
+ <source>Save All</source>
+ <translation>ཚང་མ་ཉར་ཚགས་ཡག་པོ</translation>
+ </message>
+ <message>
+ <location filename="../src/widgets/kiran-message-box/kiran-message-box-private.cpp" line="84"/>
+ <source>Open</source>
+ <translation>སྒོ་ཕྱེ་བ།</translation>
+ </message>
+ <message>
+ <location filename="../src/widgets/kiran-message-box/kiran-message-box-private.cpp" line="85"/>
+ <source>Yes</source>
+ <translation>རེད།</translation>
+ </message>
+ <message>
+ <location filename="../src/widgets/kiran-message-box/kiran-message-box-private.cpp" line="86"/>
+ <source>Yes to All</source>
+ <translation>ཚང་མར་ཁས་བླངས་པ་རེད།</translation>
+ </message>
+ <message>
+ <location filename="../src/widgets/kiran-message-box/kiran-message-box-private.cpp" line="87"/>
+ <source>No</source>
+ <translation>མིན།</translation>
+ </message>
+ <message>
+ <location filename="../src/widgets/kiran-message-box/kiran-message-box-private.cpp" line="88"/>
+ <source>No to All</source>
+ <translation>མི་ཚང་མར་མི་ཆོག</translation>
+ </message>
+ <message>
+ <location filename="../src/widgets/kiran-message-box/kiran-message-box-private.cpp" line="89"/>
+ <source>Abort</source>
+ <translation>མངལ་ཤོར་དུ་འཇུག་པ།</translation>
+ </message>
+ <message>
+ <location filename="../src/widgets/kiran-message-box/kiran-message-box-private.cpp" line="90"/>
+ <source>Retry</source>
+ <translation>བསྐྱར་དུ་ཞིབ་བཤེར་བྱ་དགོས།</translation>
+ </message>
+ <message>
+ <location filename="../src/widgets/kiran-message-box/kiran-message-box-private.cpp" line="91"/>
+ <source>Ignore</source>
+ <translation>སྣང་མེད་དུ་བཞག་</translation>
+ </message>
+ <message>
+ <location filename="../src/widgets/kiran-message-box/kiran-message-box-private.cpp" line="92"/>
+ <source>Close</source>
+ <translation>སྒོ་རྒྱག་པ།</translation>
+ </message>
+ <message>
+ <location filename="../src/widgets/kiran-message-box/kiran-message-box-private.cpp" line="93"/>
+ <source>Cancel</source>
+ <translation>ཕྱིར་འཐེན།</translation>
+ </message>
+ <message>
+ <location filename="../src/widgets/kiran-message-box/kiran-message-box-private.cpp" line="94"/>
+ <source>Discard</source>
+ <translation>བེད་མེད་དུ་བསྐྱུར་བ།</translation>
+ </message>
+ <message>
+ <location filename="../src/widgets/kiran-message-box/kiran-message-box-private.cpp" line="95"/>
+ <source>Help</source>
+ <translation>རོགས་རམ་བྱེད་པ།</translation>
+ </message>
+ <message>
+ <location filename="../src/widgets/kiran-message-box/kiran-message-box-private.cpp" line="96"/>
+ <source>Apply</source>
+ <translation>རེ་ཞུ་</translation>
+ </message>
+ <message>
+ <location filename="../src/widgets/kiran-message-box/kiran-message-box-private.cpp" line="97"/>
+ <source>Reset</source>
+ <translation>བསྐྱར་དུ་བཀོད་སྒྲིག་བྱེད་པ</translation>
+ </message>
+ <message>
+ <location filename="../src/widgets/kiran-message-box/kiran-message-box-private.cpp" line="98"/>
+ <source>Restore Defaults</source>
+ <translation>སྔོན་ཆད་ཀྱི་གནས་ཚུལ་སླར་གསོ་</translation>
+ </message>
+ <message>
+ <location filename="../src/widgets/kiran-passwd-edit/kiran-passwd-edit.cpp" line="47"/>
+ <source>Change the visibility of the password</source>
+ <comment>@info:tooltip</comment>
+ <translation>གསང་གྲངས་ཀྱི་མཐོང་ཚད་ལ་འགྱུར་ལྡོག་གཏོང་དགོས།</translation>
+ </message>
+</context>
+<context>
+ <name>TitlebarWindowSimple</name>
+ <message>
+ <location filename="../examples/kiran-titlebar-window/simple/titlebar-window-simple.ui" line="14"/>
+ <source>Form</source>
+ <translation type="unfinished">རྣམ་པ།</translation>
+ </message>
+ <message>
+ <location filename="../examples/kiran-titlebar-window/simple/titlebar-window-simple.ui" line="41"/>
+ <source>KiranTitlebarWindowSimple</source>
+ <translation type="unfinished">KiranTitlebarWindowSimple</translation>
+ </message>
+</context>
+<context>
+ <name>TitlebarWindowUI</name>
+ <message>
+ <location filename="../examples/kiran-titlebar-window/ui/titlebar-window-ui.ui" line="14"/>
+ <source>Form</source>
+ <translation type="unfinished">རྣམ་པ།</translation>
+ </message>
+ <message>
+ <location filename="../examples/kiran-titlebar-window/ui/titlebar-window-ui.ui" line="41"/>
+ <source>KiranTitlebarWindow</source>
+ <translation type="unfinished">ཁི་ལན་ཐི་ལེ་ཐི་པ་ཝུན་ཏུའོ་ཡིས་བཤད་རྒྱུར།</translation>
+ </message>
+</context>
+</TS>
\ No newline at end of file
diff --git a/translations/kiranwidgets-qt5.kk_KG.ts b/translations/kiranwidgets-qt5.kk_KG.ts
new file mode 100644
index 0000000..750ff78
--- /dev/null
+++ b/translations/kiranwidgets-qt5.kk_KG.ts
@@ -0,0 +1,135 @@
+<?xml version="1.0" ?><!DOCTYPE TS><TS version="2.1" language="zh_CN">
+<context>
+ <name>KiranTips</name>
+ <message>
+ <location filename="../src/widgets/kiran-tips/kiran-tips.ui" line="29"/>
+ <source>Form</source>
+ <translation type="unfinished">форма</translation>
+ </message>
+</context>
+<context>
+ <name>QObject</name>
+ <message>
+ <location filename="../src/widgets/kiran-message-box/kiran-message-box-private.cpp" line="81"/>
+ <source>OK</source>
+ <translation>жакшы</translation>
+ </message>
+ <message>
+ <location filename="../src/widgets/kiran-message-box/kiran-message-box-private.cpp" line="82"/>
+ <source>Save</source>
+ <translation>сактоо</translation>
+ </message>
+ <message>
+ <location filename="../src/widgets/kiran-message-box/kiran-message-box-private.cpp" line="83"/>
+ <source>Save All</source>
+ <translation>Баарын сактоо</translation>
+ </message>
+ <message>
+ <location filename="../src/widgets/kiran-message-box/kiran-message-box-private.cpp" line="84"/>
+ <source>Open</source>
+ <translation>ачуу</translation>
+ </message>
+ <message>
+ <location filename="../src/widgets/kiran-message-box/kiran-message-box-private.cpp" line="85"/>
+ <source>Yes</source>
+ <translation>Ооба</translation>
+ </message>
+ <message>
+ <location filename="../src/widgets/kiran-message-box/kiran-message-box-private.cpp" line="86"/>
+ <source>Yes to All</source>
+ <translation>Ооба баарына</translation>
+ </message>
+ <message>
+ <location filename="../src/widgets/kiran-message-box/kiran-message-box-private.cpp" line="87"/>
+ <source>No</source>
+ <translation>жок</translation>
+ </message>
+ <message>
+ <location filename="../src/widgets/kiran-message-box/kiran-message-box-private.cpp" line="88"/>
+ <source>No to All</source>
+ <translation>Баарына жок</translation>
+ </message>
+ <message>
+ <location filename="../src/widgets/kiran-message-box/kiran-message-box-private.cpp" line="89"/>
+ <source>Abort</source>
+ <translation>токтотуу</translation>
+ </message>
+ <message>
+ <location filename="../src/widgets/kiran-message-box/kiran-message-box-private.cpp" line="90"/>
+ <source>Retry</source>
+ <translation>кайра</translation>
+ </message>
+ <message>
+ <location filename="../src/widgets/kiran-message-box/kiran-message-box-private.cpp" line="91"/>
+ <source>Ignore</source>
+ <translation>этибарга албаңыз</translation>
+ </message>
+ <message>
+ <location filename="../src/widgets/kiran-message-box/kiran-message-box-private.cpp" line="92"/>
+ <source>Close</source>
+ <translation>жакын</translation>
+ </message>
+ <message>
+ <location filename="../src/widgets/kiran-message-box/kiran-message-box-private.cpp" line="93"/>
+ <source>Cancel</source>
+ <translation>жокко чыгаруу</translation>
+ </message>
+ <message>
+ <location filename="../src/widgets/kiran-message-box/kiran-message-box-private.cpp" line="94"/>
+ <source>Discard</source>
+ <translation>жокко чыгаруу</translation>
+ </message>
+ <message>
+ <location filename="../src/widgets/kiran-message-box/kiran-message-box-private.cpp" line="95"/>
+ <source>Help</source>
+ <translation>жардам</translation>
+ </message>
+ <message>
+ <location filename="../src/widgets/kiran-message-box/kiran-message-box-private.cpp" line="96"/>
+ <source>Apply</source>
+ <translation>колдонуу</translation>
+ </message>
+ <message>
+ <location filename="../src/widgets/kiran-message-box/kiran-message-box-private.cpp" line="97"/>
+ <source>Reset</source>
+ <translation>баштапкы абалга келтирүү</translation>
+ </message>
+ <message>
+ <location filename="../src/widgets/kiran-message-box/kiran-message-box-private.cpp" line="98"/>
+ <source>Restore Defaults</source>
+ <translation>Демейки калыбына келтирүү</translation>
+ </message>
+ <message>
+ <location filename="../src/widgets/kiran-passwd-edit/kiran-passwd-edit.cpp" line="47"/>
+ <source>Change the visibility of the password</source>
+ <comment>@info:tooltip</comment>
+ <translation>Сырсөздүн көрүнүшүн өзгөртүңүз</translation>
+ </message>
+</context>
+<context>
+ <name>TitlebarWindowSimple</name>
+ <message>
+ <location filename="../examples/kiran-titlebar-window/simple/titlebar-window-simple.ui" line="14"/>
+ <source>Form</source>
+ <translation type="unfinished">форма</translation>
+ </message>
+ <message>
+ <location filename="../examples/kiran-titlebar-window/simple/titlebar-window-simple.ui" line="41"/>
+ <source>KiranTitlebarWindowSimple</source>
+ <translation type="unfinished">KiranTitlebarWindowSimple</translation>
+ </message>
+</context>
+<context>
+ <name>TitlebarWindowUI</name>
+ <message>
+ <location filename="../examples/kiran-titlebar-window/ui/titlebar-window-ui.ui" line="14"/>
+ <source>Form</source>
+ <translation type="unfinished">форма</translation>
+ </message>
+ <message>
+ <location filename="../examples/kiran-titlebar-window/ui/titlebar-window-ui.ui" line="41"/>
+ <source>KiranTitlebarWindow</source>
+ <translation type="unfinished">KiranTitlebarWindow</translation>
+ </message>
+</context>
+</TS>
\ No newline at end of file
diff --git a/translations/kiranwidgets-qt5.kk_KZ.ts b/translations/kiranwidgets-qt5.kk_KZ.ts
new file mode 100644
index 0000000..d6d29c1
--- /dev/null
+++ b/translations/kiranwidgets-qt5.kk_KZ.ts
@@ -0,0 +1,135 @@
+<?xml version="1.0" ?><!DOCTYPE TS><TS version="2.1" language="zh_CN">
+<context>
+ <name>KiranTips</name>
+ <message>
+ <location filename="../src/widgets/kiran-tips/kiran-tips.ui" line="29"/>
+ <source>Form</source>
+ <translation type="unfinished">Пішіні</translation>
+ </message>
+</context>
+<context>
+ <name>QObject</name>
+ <message>
+ <location filename="../src/widgets/kiran-message-box/kiran-message-box-private.cpp" line="81"/>
+ <source>OK</source>
+ <translation>Жарайды</translation>
+ </message>
+ <message>
+ <location filename="../src/widgets/kiran-message-box/kiran-message-box-private.cpp" line="82"/>
+ <source>Save</source>
+ <translation>&amp; Сақтау</translation>
+ </message>
+ <message>
+ <location filename="../src/widgets/kiran-message-box/kiran-message-box-private.cpp" line="83"/>
+ <source>Save All</source>
+ <translation>Барлығын сақтау</translation>
+ </message>
+ <message>
+ <location filename="../src/widgets/kiran-message-box/kiran-message-box-private.cpp" line="84"/>
+ <source>Open</source>
+ <translation>Ашу</translation>
+ </message>
+ <message>
+ <location filename="../src/widgets/kiran-message-box/kiran-message-box-private.cpp" line="85"/>
+ <source>Yes</source>
+ <translation>Иә</translation>
+ </message>
+ <message>
+ <location filename="../src/widgets/kiran-message-box/kiran-message-box-private.cpp" line="86"/>
+ <source>Yes to All</source>
+ <translation>Барлығына</translation>
+ </message>
+ <message>
+ <location filename="../src/widgets/kiran-message-box/kiran-message-box-private.cpp" line="87"/>
+ <source>No</source>
+ <translation>Жоқ</translation>
+ </message>
+ <message>
+ <location filename="../src/widgets/kiran-message-box/kiran-message-box-private.cpp" line="88"/>
+ <source>No to All</source>
+ <translation>Барлығына жоқ деп айтыңыз</translation>
+ </message>
+ <message>
+ <location filename="../src/widgets/kiran-message-box/kiran-message-box-private.cpp" line="89"/>
+ <source>Abort</source>
+ <translation>Доғару</translation>
+ </message>
+ <message>
+ <location filename="../src/widgets/kiran-message-box/kiran-message-box-private.cpp" line="90"/>
+ <source>Retry</source>
+ <translation>Әрекетті қайталау</translation>
+ </message>
+ <message>
+ <location filename="../src/widgets/kiran-message-box/kiran-message-box-private.cpp" line="91"/>
+ <source>Ignore</source>
+ <translation>Елемеу</translation>
+ </message>
+ <message>
+ <location filename="../src/widgets/kiran-message-box/kiran-message-box-private.cpp" line="92"/>
+ <source>Close</source>
+ <translation>Жабу</translation>
+ </message>
+ <message>
+ <location filename="../src/widgets/kiran-message-box/kiran-message-box-private.cpp" line="93"/>
+ <source>Cancel</source>
+ <translation>Бас тарту</translation>
+ </message>
+ <message>
+ <location filename="../src/widgets/kiran-message-box/kiran-message-box-private.cpp" line="94"/>
+ <source>Discard</source>
+ <translation>&amp; Қоқыс тастау</translation>
+ </message>
+ <message>
+ <location filename="../src/widgets/kiran-message-box/kiran-message-box-private.cpp" line="95"/>
+ <source>Help</source>
+ <translation>Анықтама</translation>
+ </message>
+ <message>
+ <location filename="../src/widgets/kiran-message-box/kiran-message-box-private.cpp" line="96"/>
+ <source>Apply</source>
+ <translation>Қолдану</translation>
+ </message>
+ <message>
+ <location filename="../src/widgets/kiran-message-box/kiran-message-box-private.cpp" line="97"/>
+ <source>Reset</source>
+ <translation>Іс</translation>
+ </message>
+ <message>
+ <location filename="../src/widgets/kiran-message-box/kiran-message-box-private.cpp" line="98"/>
+ <source>Restore Defaults</source>
+ <translation>Әдепкісін қалпына келтіру</translation>
+ </message>
+ <message>
+ <location filename="../src/widgets/kiran-passwd-edit/kiran-passwd-edit.cpp" line="47"/>
+ <source>Change the visibility of the password</source>
+ <comment>@info:tooltip</comment>
+ <translation>Парольдің көрінуін өзгертіңіз</translation>
+ </message>
+</context>
+<context>
+ <name>TitlebarWindowSimple</name>
+ <message>
+ <location filename="../examples/kiran-titlebar-window/simple/titlebar-window-simple.ui" line="14"/>
+ <source>Form</source>
+ <translation type="unfinished">Пішіні</translation>
+ </message>
+ <message>
+ <location filename="../examples/kiran-titlebar-window/simple/titlebar-window-simple.ui" line="41"/>
+ <source>KiranTitlebarWindowSimple</source>
+ <translation type="unfinished">IranitleBarindoMaple</translation>
+ </message>
+</context>
+<context>
+ <name>TitlebarWindowUI</name>
+ <message>
+ <location filename="../examples/kiran-titlebar-window/ui/titlebar-window-ui.ui" line="14"/>
+ <source>Form</source>
+ <translation type="unfinished">Пішіні</translation>
+ </message>
+ <message>
+ <location filename="../examples/kiran-titlebar-window/ui/titlebar-window-ui.ui" line="41"/>
+ <source>KiranTitlebarWindow</source>
+ <translation type="unfinished">IranitleBarindow</translation>
+ </message>
+</context>
+</TS>
\ No newline at end of file
diff --git a/translations/kiranwidgets-qt5.mn_MN.ts b/translations/kiranwidgets-qt5.mn_MN.ts
new file mode 100644
index 0000000..71085e7
--- /dev/null
+++ b/translations/kiranwidgets-qt5.mn_MN.ts
@@ -0,0 +1,135 @@
+<?xml version="1.0" ?><!DOCTYPE TS><TS version="2.1" language="zh_CN">
+<context>
+ <name>KiranTips</name>
+ <message>
+ <location filename="../src/widgets/kiran-tips/kiran-tips.ui" line="29"/>
+ <source>Form</source>
+ <translation type="unfinished">Маягт</translation>
+ </message>
+</context>
+<context>
+ <name>QObject</name>
+ <message>
+ <location filename="../src/widgets/kiran-message-box/kiran-message-box-private.cpp" line="81"/>
+ <source>OK</source>
+ <translation>ЗА</translation>
+ </message>
+ <message>
+ <location filename="../src/widgets/kiran-message-box/kiran-message-box-private.cpp" line="82"/>
+ <source>Save</source>
+ <translation>Хадгалах</translation>
+ </message>
+ <message>
+ <location filename="../src/widgets/kiran-message-box/kiran-message-box-private.cpp" line="83"/>
+ <source>Save All</source>
+ <translation>Бүгдийг авраач</translation>
+ </message>
+ <message>
+ <location filename="../src/widgets/kiran-message-box/kiran-message-box-private.cpp" line="84"/>
+ <source>Open</source>
+ <translation>Нээлттэй</translation>
+ </message>
+ <message>
+ <location filename="../src/widgets/kiran-message-box/kiran-message-box-private.cpp" line="85"/>
+ <source>Yes</source>
+ <translation>Тийм ээ</translation>
+ </message>
+ <message>
+ <location filename="../src/widgets/kiran-message-box/kiran-message-box-private.cpp" line="86"/>
+ <source>Yes to All</source>
+ <translation>Бүх хүмүүст тийм</translation>
+ </message>
+ <message>
+ <location filename="../src/widgets/kiran-message-box/kiran-message-box-private.cpp" line="87"/>
+ <source>No</source>
+ <translation>Үгүй</translation>
+ </message>
+ <message>
+ <location filename="../src/widgets/kiran-message-box/kiran-message-box-private.cpp" line="88"/>
+ <source>No to All</source>
+ <translation>Бүгдэд үгүй</translation>
+ </message>
+ <message>
+ <location filename="../src/widgets/kiran-message-box/kiran-message-box-private.cpp" line="89"/>
+ <source>Abort</source>
+ <translation>Аборт</translation>
+ </message>
+ <message>
+ <location filename="../src/widgets/kiran-message-box/kiran-message-box-private.cpp" line="90"/>
+ <source>Retry</source>
+ <translation>Ретри</translation>
+ </message>
+ <message>
+ <location filename="../src/widgets/kiran-message-box/kiran-message-box-private.cpp" line="91"/>
+ <source>Ignore</source>
+ <translation>Үл тоомсорлох</translation>
+ </message>
+ <message>
+ <location filename="../src/widgets/kiran-message-box/kiran-message-box-private.cpp" line="92"/>
+ <source>Close</source>
+ <translation>Хаах</translation>
+ </message>
+ <message>
+ <location filename="../src/widgets/kiran-message-box/kiran-message-box-private.cpp" line="93"/>
+ <source>Cancel</source>
+ <translation>Цуцлах</translation>
+ </message>
+ <message>
+ <location filename="../src/widgets/kiran-message-box/kiran-message-box-private.cpp" line="94"/>
+ <source>Discard</source>
+ <translation>Хаяг</translation>
+ </message>
+ <message>
+ <location filename="../src/widgets/kiran-message-box/kiran-message-box-private.cpp" line="95"/>
+ <source>Help</source>
+ <translation>Тусламж</translation>
+ </message>
+ <message>
+ <location filename="../src/widgets/kiran-message-box/kiran-message-box-private.cpp" line="96"/>
+ <source>Apply</source>
+ <translation>Хэрэгжүүлэх</translation>
+ </message>
+ <message>
+ <location filename="../src/widgets/kiran-message-box/kiran-message-box-private.cpp" line="97"/>
+ <source>Reset</source>
+ <translation>Дахин тохируулах</translation>
+ </message>
+ <message>
+ <location filename="../src/widgets/kiran-message-box/kiran-message-box-private.cpp" line="98"/>
+ <source>Restore Defaults</source>
+ <translation>Дефолтыг сэргээх</translation>
+ </message>
+ <message>
+ <location filename="../src/widgets/kiran-passwd-edit/kiran-passwd-edit.cpp" line="47"/>
+ <source>Change the visibility of the password</source>
+ <comment>@info:tooltip</comment>
+ <translation>Нууц үгийн харагдах байдлыг өөрчлөх</translation>
+ </message>
+</context>
+<context>
+ <name>TitlebarWindowSimple</name>
+ <message>
+ <location filename="../examples/kiran-titlebar-window/simple/titlebar-window-simple.ui" line="14"/>
+ <source>Form</source>
+ <translation type="unfinished">Маягт</translation>
+ </message>
+ <message>
+ <location filename="../examples/kiran-titlebar-window/simple/titlebar-window-simple.ui" line="41"/>
+ <source>KiranTitlebarWindowSimple</source>
+ <translation type="unfinished">KiranTitlebarWindowSimple</translation>
+ </message>
+</context>
+<context>
+ <name>TitlebarWindowUI</name>
+ <message>
+ <location filename="../examples/kiran-titlebar-window/ui/titlebar-window-ui.ui" line="14"/>
+ <source>Form</source>
+ <translation type="unfinished">Маягт</translation>
+ </message>
+ <message>
+ <location filename="../examples/kiran-titlebar-window/ui/titlebar-window-ui.ui" line="41"/>
+ <source>KiranTitlebarWindow</source>
+ <translation type="unfinished">КирантлбарВиндов</translation>
+ </message>
+</context>
+</TS>
\ No newline at end of file
diff --git a/translations/kiranwidgets-qt5.ug_CN.ts b/translations/kiranwidgets-qt5.ug_CN.ts
new file mode 100644
index 0000000..0901937
--- /dev/null
+++ b/translations/kiranwidgets-qt5.ug_CN.ts
@@ -0,0 +1,135 @@
+<?xml version="1.0" ?><!DOCTYPE TS><TS version="2.1" language="zh_CN">
+<context>
+ <name>KiranTips</name>
+ <message>
+ <location filename="../src/widgets/kiran-tips/kiran-tips.ui" line="29"/>
+ <source>Form</source>
+ <translation type="unfinished">جەدۋەل</translation>
+ </message>
+</context>
+<context>
+ <name>QObject</name>
+ <message>
+ <location filename="../src/widgets/kiran-message-box/kiran-message-box-private.cpp" line="81"/>
+ <source>OK</source>
+ <translation>ماقۇل</translation>
+ </message>
+ <message>
+ <location filename="../src/widgets/kiran-message-box/kiran-message-box-private.cpp" line="82"/>
+ <source>Save</source>
+ <translation>ساقلاش</translation>
+ </message>
+ <message>
+ <location filename="../src/widgets/kiran-message-box/kiran-message-box-private.cpp" line="83"/>
+ <source>Save All</source>
+ <translation>ھەممىنى ساقلىۋېلىش</translation>
+ </message>
+ <message>
+ <location filename="../src/widgets/kiran-message-box/kiran-message-box-private.cpp" line="84"/>
+ <source>Open</source>
+ <translation>ئېچىش</translation>
+ </message>
+ <message>
+ <location filename="../src/widgets/kiran-message-box/kiran-message-box-private.cpp" line="85"/>
+ <source>Yes</source>
+ <translation>شۇنداق</translation>
+ </message>
+ <message>
+ <location filename="../src/widgets/kiran-message-box/kiran-message-box-private.cpp" line="86"/>
+ <source>Yes to All</source>
+ <translation>ھەئە ھەممىگە</translation>
+ </message>
+ <message>
+ <location filename="../src/widgets/kiran-message-box/kiran-message-box-private.cpp" line="87"/>
+ <source>No</source>
+ <translation>ياق</translation>
+ </message>
+ <message>
+ <location filename="../src/widgets/kiran-message-box/kiran-message-box-private.cpp" line="88"/>
+ <source>No to All</source>
+ <translation>ھەممە ئادەم يوق</translation>
+ </message>
+ <message>
+ <location filename="../src/widgets/kiran-message-box/kiran-message-box-private.cpp" line="89"/>
+ <source>Abort</source>
+ <translation>توختىت</translation>
+ </message>
+ <message>
+ <location filename="../src/widgets/kiran-message-box/kiran-message-box-private.cpp" line="90"/>
+ <source>Retry</source>
+ <translation>قايتا قايتا تىرشىش</translation>
+ </message>
+ <message>
+ <location filename="../src/widgets/kiran-message-box/kiran-message-box-private.cpp" line="91"/>
+ <source>Ignore</source>
+ <translation>نەزەردىن ساقىت قىلىش</translation>
+ </message>
+ <message>
+ <location filename="../src/widgets/kiran-message-box/kiran-message-box-private.cpp" line="92"/>
+ <source>Close</source>
+ <translation>ياپ</translation>
+ </message>
+ <message>
+ <location filename="../src/widgets/kiran-message-box/kiran-message-box-private.cpp" line="93"/>
+ <source>Cancel</source>
+ <translation>ئەمەلدىن قالدۇرۇش</translation>
+ </message>
+ <message>
+ <location filename="../src/widgets/kiran-message-box/kiran-message-box-private.cpp" line="94"/>
+ <source>Discard</source>
+ <translation>ۋازكەس</translation>
+ </message>
+ <message>
+ <location filename="../src/widgets/kiran-message-box/kiran-message-box-private.cpp" line="95"/>
+ <source>Help</source>
+ <translation>ياردەم</translation>
+ </message>
+ <message>
+ <location filename="../src/widgets/kiran-message-box/kiran-message-box-private.cpp" line="96"/>
+ <source>Apply</source>
+ <translation>ئىلتىماس قىلىش</translation>
+ </message>
+ <message>
+ <location filename="../src/widgets/kiran-message-box/kiran-message-box-private.cpp" line="97"/>
+ <source>Reset</source>
+ <translation>قايتا تىڭشى</translation>
+ </message>
+ <message>
+ <location filename="../src/widgets/kiran-message-box/kiran-message-box-private.cpp" line="98"/>
+ <source>Restore Defaults</source>
+ <translation>كۆڭۈلدىكىلەرنى ئەسلىگە كەلتۈرۈش</translation>
+ </message>
+ <message>
+ <location filename="../src/widgets/kiran-passwd-edit/kiran-passwd-edit.cpp" line="47"/>
+ <source>Change the visibility of the password</source>
+ <comment>@info:tooltip</comment>
+ <translation>پارولنىڭ كۆرۈش دەرىجىسىنى ئۆزگەرتىش</translation>
+ </message>
+</context>
+<context>
+ <name>TitlebarWindowSimple</name>
+ <message>
+ <location filename="../examples/kiran-titlebar-window/simple/titlebar-window-simple.ui" line="14"/>
+ <source>Form</source>
+ <translation type="unfinished">جەدۋەل</translation>
+ </message>
+ <message>
+ <location filename="../examples/kiran-titlebar-window/simple/titlebar-window-simple.ui" line="41"/>
+ <source>KiranTitlebarWindowSimple</source>
+ <translation type="unfinished">KiranTitlebarWindowSimple</translation>
+ </message>
+</context>
+<context>
+ <name>TitlebarWindowUI</name>
+ <message>
+ <location filename="../examples/kiran-titlebar-window/ui/titlebar-window-ui.ui" line="14"/>
+ <source>Form</source>
+ <translation type="unfinished">جەدۋەل</translation>
+ </message>
+ <message>
+ <location filename="../examples/kiran-titlebar-window/ui/titlebar-window-ui.ui" line="41"/>
+ <source>KiranTitlebarWindow</source>
+ <translation type="unfinished">KiranTitlebarWindow</translation>
+ </message>
+</context>
+</TS>
\ No newline at end of file
--
2.33.0

View File

@ -1,31 +0,0 @@
From 3eec02dc69346fc452aeb1ee2dc29803848500e7 Mon Sep 17 00:00:00 2001
From: liuxinhao <liuxinhao@kylinsec.com.cn>
Date: Sun, 25 Jun 2023 19:07:19 +0800
Subject: [PATCH] fix(icon): Update the title bar icon when the window state
changes
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
- 窗口状态改变时,更新标题栏图标
Closes #I7FTM3
---
.../kiran-titlebar-window/kiran-titlebar-window-private.cpp | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/widgets/kiran-titlebar-window/kiran-titlebar-window-private.cpp b/src/widgets/kiran-titlebar-window/kiran-titlebar-window-private.cpp
index 18a2aa3..8252d97 100644
--- a/src/widgets/kiran-titlebar-window/kiran-titlebar-window-private.cpp
+++ b/src/widgets/kiran-titlebar-window/kiran-titlebar-window-private.cpp
@@ -585,6 +585,7 @@ bool KiranTitlebarWindowPrivate::eventFilter(QObject *obj, QEvent *event)
{
m_frame->setRadius(radius);
}
+ updateTitlebarButtonIcon();
break;
default:
break;
--
2.33.0

View File

@ -1,97 +0,0 @@
From c6b513e64aa283ee22fab2b4ba862950bcafd28f Mon Sep 17 00:00:00 2001
From: liuxinhao <liuxinhao@kylinsec.com.cn>
Date: Tue, 5 Sep 2023 15:18:49 +0800
Subject: [PATCH] fix(qt5.9.7): fits the Qt5.9.7 interface
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
- 适配Qt5.9.7接口,修复编译报错
---
src/widgets/kiran-label/kiran-label.cpp | 20 ++++++++++++--------
src/widgets/kiran-tips/kiran-tips.cpp | 6 +++++-
test/kiran-image-selector-test.cpp | 4 ++--
3 files changed, 19 insertions(+), 11 deletions(-)
diff --git a/src/widgets/kiran-label/kiran-label.cpp b/src/widgets/kiran-label/kiran-label.cpp
index 6302357..3dcd0e5 100644
--- a/src/widgets/kiran-label/kiran-label.cpp
+++ b/src/widgets/kiran-label/kiran-label.cpp
@@ -1,14 +1,14 @@
/**
- * Copyright (c) 2020 ~ 2022 KylinSec Co., Ltd.
+ * Copyright (c) 2020 ~ 2022 KylinSec Co., Ltd.
* kiranwidgets-qt5 is licensed under Mulan PSL v2.
- * You can use this software according to the terms and conditions of the Mulan PSL v2.
+ * You can use this software according to the terms and conditions of the Mulan PSL v2.
* You may obtain a copy of Mulan PSL v2 at:
- * http://license.coscl.org.cn/MulanPSL2
- * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
- * EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
- * MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
- * See the Mulan PSL v2 for more details.
- *
+ * http://license.coscl.org.cn/MulanPSL2
+ * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
+ * EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
+ * MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
+ * See the Mulan PSL v2 for more details.
+ *
* Author: liuxinhao <liuxinhao@kylinos.com.cn>
*/
@@ -73,7 +73,11 @@ QRectF KiranLabelPrivate::documentRect(QLabelPrivate *ld)
QFlag(ld->align));
int m = ld->indent;
if (m < 0 && q->frameWidth()) // no indent, but we do have a frame
+#if (QT_VERSION >= QT_VERSION_CHECK(5, 11, 0))
m = q->fontMetrics().horizontalAdvance(QLatin1Char('x')) / 2 - ld->margin;
+#else
+ m = q->fontMetrics().width(QLatin1Char('x')) / 2 - ld->margin;
+#endif
if (m > 0)
{
if (align & Qt::AlignLeft)
diff --git a/src/widgets/kiran-tips/kiran-tips.cpp b/src/widgets/kiran-tips/kiran-tips.cpp
index d5bcbf6..91d2e6f 100644
--- a/src/widgets/kiran-tips/kiran-tips.cpp
+++ b/src/widgets/kiran-tips/kiran-tips.cpp
@@ -231,7 +231,11 @@ QSize KiranTips::getRightSize() const
QFontMetrics fontMetrics(font);
QMargins layoutContentMargins = this->layout()->contentsMargins();
+#if (QT_VERSION >= QT_VERSION_CHECK(5, 11, 0))
d_ptr->m_labelText->setFixedWidth(fontMetrics.horizontalAdvance(d_ptr->m_labelText->text()) + 10);
+#else
+ d_ptr->m_labelText->setFixedWidth(fontMetrics.width(d_ptr->m_labelText->text()) + 10);
+#endif
d_ptr->m_labelText->setFixedHeight(fontMetrics.height());
QSize size;
@@ -355,7 +359,7 @@ void KiranTipsPrivate::init()
m_EnterAnimation->setEasingCurve(QEasingCurve::OutQuad);
// clang-format off
- connect(&m_fadeOutTimer, &QTimer::timeout, [this](){
+ connect(&m_fadeOutTimer, &QTimer::timeout, [this](){
q_ptr->hideTip();
});
connect(m_EnterAnimation, &QPropertyAnimation::finished, [this](){
diff --git a/test/kiran-image-selector-test.cpp b/test/kiran-image-selector-test.cpp
index 7651e07..cf306cd 100644
--- a/test/kiran-image-selector-test.cpp
+++ b/test/kiran-image-selector-test.cpp
@@ -43,8 +43,8 @@ private slots:
void testItemSpacing()
{
- QList<int> itemSpacingSet = {5,10,15,20,25,50,100,150,300,10};
- foreach ( const int& spacing, itemSpacingSet )
+ QList<quint64> itemSpacingSet = {5,10,15,20,25,50,100,150,300,10};
+ foreach ( const quint64& spacing, itemSpacingSet )
{
imageSelector->setItemSpacing(spacing);
QCOMPARE(imageSelector->itemSpacing(),spacing);
--
2.33.0

Binary file not shown.

Binary file not shown.

View File

@ -1,19 +1,12 @@
Name: kiran-widgets-qt5
Version: 2.4.0
Release: 6
Version: 2.4.1
Release: 1
Summary: Encapsulated QT Widget
Summary(zh_CN): 封装的Qt小部件
License: MulanPSL-2.0
Source0: %{name}-%{version}.tar.gz
Patch0001: 0001-feat-KiranLabel-KiranPasswdEdit-new-control-KiranLab.patch
Patch0002: 0002-fix-KiranSiderbarWidget-If-the-text-is-too-wide-and-.patch
Patch0003: 0003-fix-KiranTitlebarWindow-Fix-when-zoomed-twice_GTK_FR.patch
Patch0004: 0004-fix-translate-add-some-translation.patch
Patch0005: 0005-fix-icon-Update-the-title-bar-icon-when-the-window-s.patch
Patch0006: 0006-fix-qt5.9.7-fits-the-Qt5.9.7-interface.patch
BuildRequires: cmake >= 3.5
BuildRequires: gcc-c++
@ -83,6 +76,9 @@ make %{?_smp_mflags}
rm -rf %{buildroot}
%changelog
* Tue Sep 05 2023 liuxinhao <liuxinhao@kylinsec.com.cn> - 2.4.1-1
- KYBD: rebuild
* Tue Sep 05 2023 liuxinhao <liuxinhao@kylinsec.com.cn> - 2.4.0-6
- KYOS-F: fits the Qt5.9.7 interface