forked from openkylin/qt5-ukui-platformtheme
Update changelog 2024.06.06 4.1.0.0-0k43
This commit is contained in:
parent
b575cb5cec
commit
2eeeb7029c
|
@ -1,3 +1,13 @@
|
|||
qt5-ukui-platformtheme (4.1.0.0-ok43) nile; urgency=medium
|
||||
|
||||
* 改动:
|
||||
BUG号:#I8M4ZO 修复treeview的branch箭头旋转动画错误
|
||||
需求号:无
|
||||
其他改动:更新README.md
|
||||
影响域:无
|
||||
|
||||
-- xibowen <xibowen@kylinos.cn> Thu, 06 Jun 2024 15:44:38 +0800
|
||||
|
||||
qt5-ukui-platformtheme (4.1.0.0-ok42) nile; urgency=medium
|
||||
|
||||
* 改动:
|
||||
|
|
|
@ -0,0 +1,157 @@
|
|||
From: xibowen <xibowen@kylinos.cn>
|
||||
Date: Thu, 6 Jun 2024 15:46:18 +0800
|
||||
Subject: Update changelog 2024.06.06 4.1.0.0-0k43
|
||||
|
||||
---
|
||||
README.md | 17 +++++++++-------
|
||||
.../animations/config-tree-animator.cpp | 8 ++++----
|
||||
.../animations/config-tree-animator.h | 5 +++--
|
||||
.../qt5-config-style-ukui/ukui-config-style.cpp | 23 ++++++++++++++++------
|
||||
4 files changed, 34 insertions(+), 19 deletions(-)
|
||||
|
||||
diff --git a/README.md b/README.md
|
||||
index 38e9295..8086525 100644
|
||||
--- a/README.md
|
||||
+++ b/README.md
|
||||
@@ -1,9 +1,15 @@
|
||||
# qt5-ukui-platformtheme
|
||||
|
||||
-![build](https://github.com/ukui/qt5-ukui-platformtheme/workflows/Check%20build/badge.svg?branch=master)
|
||||
-
|
||||
The UKUI platform theme for qt5 QPA.
|
||||
|
||||
+## Wiki on Gitee
|
||||
+[Wiki](https://gitee.com/openkylin/qt5-ukui-platformtheme/wikis/Home)
|
||||
+
|
||||
+# Introduction
|
||||
+[zh_CN](https://gitee.com/openkylin/qt5-ukui-platformtheme/wikis/%E9%A1%B9%E7%9B%AE%E7%AE%80%E4%BB%8B)
|
||||
+
|
||||
+[安装和测试](https://gitee.com/openkylin/qt5-ukui-platformtheme/wikis/%E5%AE%89%E8%A3%85%26%E6%B5%8B%E8%AF%95%E6%B5%81%E7%A8%8B)
|
||||
+
|
||||
## Document
|
||||
See [doxygen/README.md](doxygen/README.md).
|
||||
|
||||
@@ -38,8 +44,5 @@ That will let the gsettings used by qt5-ukui-platformtheme worked.
|
||||
Then you can run the test in project, or run any qt5 program for testing with ukui platformtheme.
|
||||
|
||||
### ToDoList
|
||||
-- menu blur
|
||||
-- custom palette
|
||||
-- style switch/management
|
||||
-- Change style's details through configuration file
|
||||
-- animations
|
||||
+- change style's details through configuration file
|
||||
+- animations
|
||||
diff --git a/ukui-styles/qt5-config-style-ukui/animations/config-tree-animator.cpp b/ukui-styles/qt5-config-style-ukui/animations/config-tree-animator.cpp
|
||||
index 2309e8e..d5262b8 100644
|
||||
--- a/ukui-styles/qt5-config-style-ukui/animations/config-tree-animator.cpp
|
||||
+++ b/ukui-styles/qt5-config-style-ukui/animations/config-tree-animator.cpp
|
||||
@@ -279,17 +279,17 @@ int ConfigTreeAnimator::totalAnimationDuration(const QString &property)
|
||||
void ConfigTreeAnimator::setExtraProperty(const QString &property, const QVariant &value)
|
||||
{
|
||||
if(property == "expandItem")
|
||||
- m_expandItem = value.toString();
|
||||
+ m_expandIndex = value.toModelIndex();
|
||||
else if(property == "collapsItem")
|
||||
- m_collapsItem = value.toString();
|
||||
+ m_collapsIndex = value.toModelIndex();
|
||||
}
|
||||
|
||||
QVariant ConfigTreeAnimator::getExtraProperty(const QString &property)
|
||||
{
|
||||
if(property == "expandItem")
|
||||
- return m_expandItem;
|
||||
+ return m_expandIndex;
|
||||
else if(property == "collapsItem")
|
||||
- return m_collapsItem;
|
||||
+ return m_collapsIndex;
|
||||
return QVariant();
|
||||
}
|
||||
|
||||
diff --git a/ukui-styles/qt5-config-style-ukui/animations/config-tree-animator.h b/ukui-styles/qt5-config-style-ukui/animations/config-tree-animator.h
|
||||
index 664dc53..a6f2d9a 100644
|
||||
--- a/ukui-styles/qt5-config-style-ukui/animations/config-tree-animator.h
|
||||
+++ b/ukui-styles/qt5-config-style-ukui/animations/config-tree-animator.h
|
||||
@@ -24,6 +24,7 @@
|
||||
#define TREEANIMATOR_H
|
||||
|
||||
#include <QParallelAnimationGroup>
|
||||
+#include <QModelIndex>
|
||||
#include "animations/animator-iface.h"
|
||||
|
||||
|
||||
@@ -64,8 +65,8 @@ private:
|
||||
|
||||
QVariantAnimation *m_expand = nullptr;
|
||||
QVariantAnimation *m_collaps = nullptr;
|
||||
- QString m_expandItem;
|
||||
- QString m_collapsItem;
|
||||
+ QModelIndex m_expandIndex;
|
||||
+ QModelIndex m_collapsIndex;
|
||||
};
|
||||
|
||||
}
|
||||
diff --git a/ukui-styles/qt5-config-style-ukui/ukui-config-style.cpp b/ukui-styles/qt5-config-style-ukui/ukui-config-style.cpp
|
||||
index 63c8c06..1a5a323 100644
|
||||
--- a/ukui-styles/qt5-config-style-ukui/ukui-config-style.cpp
|
||||
+++ b/ukui-styles/qt5-config-style-ukui/ukui-config-style.cpp
|
||||
@@ -1155,7 +1155,7 @@ void UKUIConfigStyle::polish(QWidget *widget)
|
||||
if(!animator)
|
||||
return;
|
||||
|
||||
- animator->setExtraProperty("expandItem", QString::number(index.internalId()));
|
||||
+ animator->setExtraProperty("expandItem", index);
|
||||
|
||||
if(animator->isRunning("collaps")){
|
||||
animator->stopAnimator("collaps");
|
||||
@@ -1173,7 +1173,7 @@ void UKUIConfigStyle::polish(QWidget *widget)
|
||||
if(!animator)
|
||||
return;
|
||||
|
||||
- animator->setExtraProperty("collapsItem", QString::number(index.internalId()));
|
||||
+ animator->setExtraProperty("collapsItem", index);
|
||||
|
||||
if(animator->isRunning("expand")){
|
||||
animator->stopAnimator("expand");
|
||||
@@ -2229,7 +2229,8 @@ void UKUIConfigStyle::drawPrimitive(QStyle::PrimitiveElement element, const QSty
|
||||
auto animator = m_tree_animation_helper->animator(treeview);
|
||||
if(animator){
|
||||
if(animator && animator->isRunning("expand") &&
|
||||
- QString::number(treeview->indexAt(option->rect.center()).internalId()) == animator->getExtraProperty("expandItem").toString()){
|
||||
+ treeview->indexAt(option->rect.center()) == animator->getExtraProperty("expandItem").toModelIndex()) {
|
||||
+
|
||||
rotate = animator->value("expand").toDouble();
|
||||
|
||||
if(animator->value("expand").toDouble() == 1){
|
||||
@@ -2309,9 +2310,10 @@ void UKUIConfigStyle::drawPrimitive(QStyle::PrimitiveElement element, const QSty
|
||||
if(!m_tree_animation_helper)
|
||||
break;
|
||||
auto animator = m_tree_animation_helper->animator(treeview);
|
||||
- if(animator){
|
||||
+ if (animator) {
|
||||
if(animator && animator->isRunning("collaps") &&
|
||||
- QString::number(treeview->indexAt(option->rect.center()).internalId()) == animator->getExtraProperty("collapsItem").toString()){
|
||||
+ treeview->indexAt(option->rect.center()) == animator->getExtraProperty("collapsItem").toModelIndex()) {
|
||||
+
|
||||
rotate = animator->value("collaps").toDouble();
|
||||
if(animator->value("collaps").toDouble() == 1){
|
||||
animator->setAnimatorCurrentTime("collaps", 0);
|
||||
@@ -3585,8 +3587,17 @@ void UKUIConfigStyle::drawPrimitive(QStyle::PrimitiveElement element, const QSty
|
||||
|
||||
painter->restore();
|
||||
|
||||
- return Style::drawPrimitive(PE_IndicatorBranch, option, painter, widget);
|
||||
+ //branch arrow
|
||||
+ if (!(option->state & State_Children))
|
||||
+ break;
|
||||
+ if (option->state & State_Open) {
|
||||
+ drawPrimitive(PE_IndicatorArrowDown, option, painter, widget);
|
||||
+ } else {
|
||||
+ const bool reverse = (option->direction == Qt::RightToLeft);
|
||||
+ drawPrimitive(reverse ? PE_IndicatorArrowLeft : PE_IndicatorArrowRight, option, painter, widget);
|
||||
+ }
|
||||
|
||||
+ return;
|
||||
}
|
||||
|
||||
// if (!(option->state & State_Children)) {
|
|
@ -55,3 +55,4 @@
|
|||
0055-109.patch
|
||||
0056-udpate-changelog.patch
|
||||
0057-update-changelog.patch
|
||||
0058-Update-changelog-2024.06.06-4.1.0.0-0k43.patch
|
||||
|
|
Loading…
Reference in New Issue